This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
if -d HARNESS_TIMER, t/TEST saves timings in Storable file
authorJim Cromie <jim.cromie@gmail.com>
Sun, 13 Mar 2011 19:13:27 +0000 (13:13 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 10 Sep 2011 03:16:02 +0000 (20:16 -0700)
commit8e03ad8f6c24ab6b98b196deca21ee507e4773f7
treeeecda090eaa72355abd4dc40ab2006157f961c90
parentb49055e966b614a7aa5d3eda7075ca3262694b6f
if -d HARNESS_TIMER, t/TEST saves timings in Storable file

if HARNESS_TIMER envar is an existing directory, write timings data
and various platform and configuration data to a Storable file.
Given a large collection of files, the variance of each test can be
determined.

The configuration data should be sufficient to compare different
builds done on the same box.  The platform data will hopefully allow
meaningful comparison of tests done on similar boxes, with same or
other OS, compiler, memory, etc.  Both are subject to change, for both
content and format, latter being less important because of the
normalization possible during analysis, if the data is there.

Harness output still looks the same:

t/porting/cmp_version ......................................... ok      757 ms
t/porting/diag ................................................ ok     1172 ms
t/porting/dual-life ........................................... ok       88 ms
t/porting/exec-bit ............................................ ok       86 ms
t/porting/filenames ........................................... ok      176 ms
t/porting/globvar ............................................. ok       99 ms
t/porting/maintainers ......................................... ok      501 ms
t/porting/manifest ............................................ ok      251 ms
t/porting/podcheck ............................................ ok    15013 ms
t/porting/regen ............................................... ok     1033 ms
t/porting/test_bootstrap ...................................... ok       36 ms
All tests successful.
u=11.67  s=5.07  cu=375.07  cs=84.26  scripts=2045  tests=471995
wrote storable file: ../../perf/2011-9-7-2-45.ttimes

The Storable file data looks like:

$VAR1 = {
  'conf' => {
    'byacc' => 'byacc',
    'cc' => 'cc',
    'cccdlflags' => '-fPIC',
    'ccdlflags' => '-Wl,-E',
    ...
  },
  'host' => 'groucho.jimc.earth',
  'perf' => {
    '../cpan/Archive-Extract/t/01_Archive-Extract.t' => '3960.50214767456',
    '../cpan/Archive-Tar/t/01_use.t' => '94.3360328674316',
    '../cpan/Archive-Tar/t/02_methods.t' => '737.880945205688',
    '../cpan/Archive-Tar/t/03_file.t' => '118.676900863647',
    '../cpan/Archive-Tar/t/04_resolved_issues.t' => '130.842924118042',
    ...
t/TEST