develooper Front page | perl.perl5.porters | Postings from September 2010

[perl #77630] [patch] HARNESS_TIMER=$PWD/../perf make test should save timings to dir

From:
Jim Cromie
Date:
September 2, 2010 01:13
Subject:
[perl #77630] [patch] HARNESS_TIMER=$PWD/../perf make test should save timings to dir
Message ID:
rt-3.6.HEAD-5116-1283369492-1802.77630-75-0@perl.org
# New Ticket Created by  Jim Cromie 
# Please include the string:  [perl #77630]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77630 >


attached patch extends HARNESS_TIMER functionality to save test-timing data,
as a storable file, to the given (existing) directory.

[jimc@groucho perf]$ ls
2010-12:06:29-1-Sep-Wed.ttimes  2010-12:47:14-1-Sep-Wed.ttimes

the storable file contains selected config info (/cc|git|config_arg\d+/)
so that performance of different builds/configs can be compared,
and platform data so that performance data collected by different people,
on similar or different platforms can be compared too.

          'conf' => {
                      'byacc' => 'byacc',
                      'cc' => 'cc',
                      'cccdlflags' => '-fPIC',
                      'ccdlflags' => '-Wl,-E',
...
                      'ccname' => 'gcc',
                      'ccsymbols' => '',
                      'ccversion' => '',
                      'config_arg0' => 'Configure',
                      'config_arg1' => '-des',
                      'config_arg2' => '-Dusedevel',
                      'config_arg3' => '-DDEBUGGING',
                      'config_arg4' => '-Accflags=-DPL_OP_SLAB_ALLOC
-DPERL_MEM_LOG',
                      'gccversion' => '4.4.4 20100630 (Red Hat 4.4.4-10)',
...
                      'git_branch' => 'blead',
                      'git_commit_date' => '2010-09-01 15:00:54 +0100',
                      'git_commit_id' =>
'8f776eae7309066191255dd931db9a380d05f5f9',
                      'git_commit_id_title' => 'Commit id:',
                      'git_describe' => 'v5.13.4-101-g8f776ea',
                      'git_uncommitted_changes' => '0',

the git data here is unfortunately *not* correct, that probably cuz I did
git checkout -b test-time;  without git clean -dxf afterwards.
This wont be a problem if/when used in a smoker setup,
but it would be nice if these config-params could be repopulated during the
build,
as this would improve tracability of ad-hoc testing/ experimentation.

heres what it should be
[jimc@groucho perl-git]$ git branch
  blead
* test-time

commit 19b40b6424a1a2eb13f3f9afeb329ce082a2830a
Author: Jim Cromie <jim.cromie@gmail.com>
Date:   Wed Sep 1 12:25:25 2010 -0600

    extend HARNESS_TIMER functionality

    if HARNESS_TIMER=<an existing directory>
    write test timing data to a storable file in that directory,
    along with some config and platform data to enable comparison between
files.
    Platform data is $^O plus stuff grepped from /proc/cpuinfo, if it
exists.

commit 8f776eae7309066191255dd931db9a380d05f5f9
Author: Nicholas Clark <nick@ccl4.org>
Date:   Wed Sep 1 14:32:47 2010 +0100


platform data is grepped out of /proc/cpuinfo, which is *nix specific,
but doesnt require non-core-dist modules, and is a useful start.

          'platform' => [
                          'linux',
                          'cpu family : 16',
                          'model name : AMD Athlon(tm) II X4 630 Processor',
                          'cpu MHz : 800.000',
                          'cpu cores : 4',
                          'cpuid level : 5',
                          'cpu family : 16',
                          'model name : AMD Athlon(tm) II X4 630 Processor',
                          'cpu MHz : 2800.000',
                          'cpu cores : 4',
                          'cpuid level : 5',
                          'cpu family : 16',
                          'model name : AMD Athlon(tm) II X4 630 Processor',
                          'cpu MHz : 800.000',
                          'cpu cores : 4',
                          'cpuid level : 5',
                          'cpu family : 16',
                          'model name : AMD Athlon(tm) II X4 630 Processor',
                          'cpu MHz : 2800.000',
                          'cpu cores : 4',
                          'cpuid level : 5'
                        ],
          'total' => 'u=13.17  s=4.07  cu=574.10  cs=65.06  scripts=1758
 tests=381371'

FWIW, this test was run with make -j8 test, so its interesting that only 2
of the CPUs
were running at full speed when this file was read.  I conclude that the
other 2 had
throttled down after the OS stopped giving them work.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About