Filename | /home/ss5/local/projects/data-dpath/t/optimization.t |
Statements | Executed 44 statements in 4.24ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 4.21ms | 12.5ms | BEGIN@7 | main::
1 | 1 | 1 | 4.10ms | 17.8ms | BEGIN@6 | main::
1 | 1 | 1 | 2.12ms | 2.15ms | BEGIN@4 | main::
1 | 1 | 1 | 479µs | 92.5ms | BEGIN@8 | main::
1 | 1 | 1 | 380µs | 430µs | BEGIN@3 | main::
10 | 10 | 7 | 133µs | 133µs | VERSION (xsub) | UNIVERSAL::
37 | 3 | 3 | 68µs | 68µs | isa (xsub) | UNIVERSAL::
2 | 2 | 1 | 52µs | 52µs | CORE:readline (opcode) | main::
2 | 2 | 1 | 30µs | 30µs | CORE:open (opcode) | main::
23 | 1 | 1 | 18µs | 18µs | SvREADONLY (xsub) | Internals::
1 | 1 | 1 | 13µs | 13µs | (bool (xsub) | version::
1 | 1 | 1 | 13µs | 39µs | BEGIN@9 | main::
2 | 2 | 1 | 11µs | 11µs | CORE:close (opcode) | main::
1 | 1 | 1 | 11µs | 149µs | BEGIN@21 | main::
1 | 1 | 1 | 8µs | 184µs | BEGIN@13 | main::
4 | 1 | 1 | 7µs | 7µs | method_changed_in (xsub) | mro::
1 | 1 | 1 | 6µs | 6µs | (cmp (xsub) | version::
0 | 0 | 0 | 0s | 0s | RUNTIME | main::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
0 | 2 | 59µs | Profile data that couldn't be associated with a specific line: # spent 57µs making 1 call to Test::Builder::END
# spent 2µs making 1 call to Class::XSAccessor::END | ||
1 | 1 | 37µs | #! /usr/bin/env perl | ||
2 | |||||
3 | 2 | 344µs | 2 | 453µs | # spent 430µs (380+51) within main::BEGIN@3 which was called:
# once (380µs+51µs) by main::RUNTIME at line 3 # spent 430µs making 1 call to main::BEGIN@3
# spent 23µs making 1 call to strict::import |
4 | 2 | 2.00ms | 2 | 2.16ms | # spent 2.15ms (2.12+29µs) within main::BEGIN@4 which was called:
# once (2.12ms+29µs) by main::RUNTIME at line 4 # spent 2.15ms making 1 call to main::BEGIN@4
# spent 9µs making 1 call to warnings::import |
5 | |||||
6 | 2 | 124µs | 2 | 19.7ms | # spent 17.8ms (4.10+13.7) within main::BEGIN@6 which was called:
# once (4.10ms+13.7ms) by main::RUNTIME at line 6 # spent 17.8ms making 1 call to main::BEGIN@6
# spent 1.90ms making 1 call to Test::Builder::Module::import |
7 | 2 | 103µs | 2 | 12.7ms | # spent 12.5ms (4.21+8.25) within main::BEGIN@7 which was called:
# once (4.21ms+8.25ms) by main::RUNTIME at line 7 # spent 12.5ms making 1 call to main::BEGIN@7
# spent 210µs making 1 call to Exporter::import |
8 | 2 | 100µs | 2 | 92.7ms | # spent 92.5ms (479µs+92.1) within main::BEGIN@8 which was called:
# once (479µs+92.1ms) by main::RUNTIME at line 8 # spent 92.5ms making 1 call to main::BEGIN@8
# spent 155µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
9 | 2 | 56µs | 2 | 66µs | # spent 39µs (13+27) within main::BEGIN@9 which was called:
# once (13µs+27µs) by main::RUNTIME at line 9 # spent 39µs making 1 call to main::BEGIN@9
# spent 27µs making 1 call to Exporter::import |
10 | |||||
11 | # local $Data::DPath::DEBUG = 1; | ||||
12 | |||||
13 | # spent 184µs (8+176) within main::BEGIN@13 which was called:
# once (8µs+176µs) by main::RUNTIME at line 19 | ||||
14 | 1 | 4µs | if ($] < 5.010) { | ||
15 | plan skip_all => "Perl 5.010 required for the smartmatch overloaded tests. This is ".$]; | ||||
16 | } else { | ||||
17 | 1 | 2µs | 1 | 176µs | plan tests => 5; # spent 176µs making 1 call to Test::More::plan |
18 | } | ||||
19 | 1 | 528µs | 1 | 184µs | } # spent 184µs making 1 call to main::BEGIN@13 |
20 | |||||
21 | 3 | 23µs | 3 | 914µs | # spent 149µs (11+139) within main::BEGIN@21 which was called:
# once (11µs+139µs) by Test::More::_eval at line 21 # spent 626µs making 1 call to Test::More::use_ok
# spent 149µs making 1 call to main::BEGIN@21
# spent 139µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
22 | 1 | 2µs | |||
23 | 1 | 500ns | my $datacontent=''; | ||
24 | { | ||||
25 | 2 | 2µs | local $/; | ||
26 | 1 | 20µs | 1 | 14µs | open F, "<", "t/bigdata.dump" or die; # spent 14µs making 1 call to main::CORE:open |
27 | 1 | 26µs | 1 | 21µs | $datacontent = <F>; # spent 21µs making 1 call to main::CORE:readline |
28 | 1 | 10µs | 1 | 4µs | close F; # spent 4µs making 1 call to main::CORE:close |
29 | } | ||||
30 | 1 | 200ns | my $VAR1; | ||
31 | 1 | 267µs | eval $datacontent; # spent 82µs executing statements in string eval | ||
32 | 1 | 400ns | my $data = $VAR1; | ||
33 | |||||
34 | 1 | 200ns | my $res; | ||
35 | |||||
36 | 1 | 13µs | 2 | 526µs | $res = $data ~~ dpath('/report'); # spent 302µs making 1 call to Data::DPath::__ANON__[lib/Data/DPath.pm:19]
# spent 224µs making 1 call to Data::DPath::Path::op_match |
37 | 1 | 3µs | 1 | 362µs | is($res->[0]{reportgroup_testrun_id}, 30862, "simple dpath" ); # spent 362µs making 1 call to Test::More::is |
38 | |||||
39 | 1 | 42µs | 2 | 2.52ms | $res = $data ~~ dpath('//data//benchmark[ value eq "call_simple"]/../mean/..'); # spent 1.93ms making 1 call to Data::DPath::Path::op_match
# spent 586µs making 1 call to Data::DPath::__ANON__[lib/Data/DPath.pm:19] |
40 | 1 | 12µs | 1 | 17.6ms | cmp_bag($res, [ # spent 17.6ms making 1 call to Test::Deep::cmp_bag |
41 | { | ||||
42 | 'glibc' => 'glibc, 2.4', | ||||
43 | 'count' => '150', | ||||
44 | 'language_series' => 'arch_barcelona', | ||||
45 | 'standard_deviation' => '0.0164822946672', | ||||
46 | 'language_binary' => '/opt/artemis/slbench/python/arch_barcelona/2.7/bin/python', | ||||
47 | 'release' => '2.6.30.10-105.2.23.fc11.x86_64', | ||||
48 | 'operating_system' => 'Linux', | ||||
49 | 'hostname' => 'foo.dept.lhm.com', | ||||
50 | 'mean' => '0.592707689603', | ||||
51 | 'median' => '0.58355140686', | ||||
52 | 'architecture' => '64bit', | ||||
53 | 'number_CPUs' => '16', | ||||
54 | 'benchmark' => 'call_simple', | ||||
55 | 'machine' => 'x86_64' | ||||
56 | } | ||||
57 | ] | ||||
58 | , "very complicated dpath" ); | ||||
59 | |||||
60 | 1 | 700ns | $datacontent=''; | ||
61 | { | ||||
62 | 2 | 2µs | local $/; | ||
63 | 1 | 21µs | 1 | 16µs | open F, "<", "t/bigdata2.dump" or die; # spent 16µs making 1 call to main::CORE:open |
64 | 1 | 37µs | 1 | 31µs | $datacontent = <F>; # spent 31µs making 1 call to main::CORE:readline |
65 | 1 | 21µs | 1 | 7µs | close F; # spent 7µs making 1 call to main::CORE:close |
66 | } | ||||
67 | 1 | 286µs | eval $datacontent; # spent 82µs executing statements in string eval | ||
68 | 1 | 12µs | $data = $VAR1; | ||
69 | |||||
70 | 1 | 13µs | 2 | 305µs | $res = $data ~~ dpath('/report'); # spent 200µs making 1 call to Data::DPath::__ANON__[lib/Data/DPath.pm:19]
# spent 105µs making 1 call to Data::DPath::Path::op_match |
71 | 1 | 4µs | 1 | 357µs | is($res->[0]{reportgroup_testrun_id}, 30862, "simple dpath 2" ); # spent 357µs making 1 call to Test::More::is |
72 | |||||
73 | 1 | 73µs | 2 | 2.76ms | $res = $data ~~ dpath('//data//benchmark[ value eq "xcall_simple"]/../mean/..'); # spent 2.23ms making 1 call to Data::DPath::Path::op_match
# spent 530µs making 1 call to Data::DPath::__ANON__[lib/Data/DPath.pm:19] |
74 | 1 | 46µs | 1 | 3.24ms | cmp_bag($res, [ # spent 3.24ms making 1 call to Test::Deep::cmp_bag |
75 | { | ||||
76 | 'glibc' => 'xglibc, 2.4', | ||||
77 | 'count' => 'x150', | ||||
78 | 'language_series' => 'xarch_barcelona', | ||||
79 | 'standard_deviation' => 'x0.0164822946672', | ||||
80 | 'language_binary' => 'x/opt/artemis/slbench/python/arch_barcelona/2.7/bin/python', | ||||
81 | 'release' => 'x2.6.30.10-105.2.23.fc11.x86_64', | ||||
82 | 'operating_system' => 'xLinux', | ||||
83 | 'hostname' => 'xfoo.dept.lhm.com', | ||||
84 | 'mean' => 'x0.592707689603', | ||||
85 | 'median' => 'x0.58355140686', | ||||
86 | 'architecture' => 'x64bit', | ||||
87 | 'number_CPUs' => 'x16', | ||||
88 | 'benchmark' => 'xcall_simple', | ||||
89 | 'machine' => 'xx86_64' | ||||
90 | } | ||||
91 | ] | ||||
92 | , "dpath on complex blessed ARRAYs" ); | ||||
# spent 18µs within Internals::SvREADONLY which was called 23 times, avg 791ns/call:
# 23 times (18µs+0s) by constant::import at line 147 of constant.pm, avg 791ns/call | |||||
# spent 133µs within UNIVERSAL::VERSION which was called 10 times, avg 13µs/call:
# once (21µs+0s) by Test::Builder::Module::BEGIN@5 at line 5 of Test/Builder/Module.pm
# once (16µs+0s) by Test::More::BEGIN@23 at line 23 of Test/More.pm
# once (14µs+0s) by Data::OptList::BEGIN@11 at line 11 of Data/OptList.pm
# once (13µs+0s) by Exception::Class::Base::BEGIN@9 at line 9 of Exception/Class/Base.pm
# once (13µs+0s) by Exception::Class::Base::BEGIN@10 at line 10 of Exception/Class/Base.pm
# once (13µs+0s) by Sub::Exporter::BEGIN@11 at line 11 of Sub/Exporter.pm
# once (12µs+0s) by Exporter::Heavy::heavy_export at line 120 of Exporter/Heavy.pm
# once (12µs+0s) by Data::DPath::Path::BEGIN@11 at line 11 of lib/Data/DPath/Path.pm
# once (10µs+0s) by Sub::Exporter::BEGIN@12 at line 12 of Sub/Exporter.pm
# once (9µs+0s) by Sub::Exporter::BEGIN@13 at line 13 of Sub/Exporter.pm | |||||
# spent 68µs within UNIVERSAL::isa which was called 37 times, avg 2µs/call:
# 18 times (42µs+0s) by base::import at line 74 of base.pm, avg 2µs/call
# 16 times (22µs+0s) by Test::Deep::wrap at line 362 of Test/Deep.pm, avg 1µs/call
# 3 times (4µs+0s) by Exception::Class::_make_subclass at line 152 of Exception/Class.pm, avg 2µs/call | |||||
sub main::CORE:close; # opcode | |||||
sub main::CORE:open; # opcode | |||||
sub main::CORE:readline; # opcode | |||||
# spent 7µs within mro::method_changed_in which was called 4 times, avg 2µs/call:
# 4 times (7µs+0s) by constant::import at line 162 of constant.pm, avg 2µs/call | |||||
# spent 13µs within version::(bool which was called:
# once (13µs+0s) by Test::Builder::BEGIN@19 at line 57 of Config.pm | |||||
# spent 6µs within version::(cmp which was called:
# once (6µs+0s) by Test::Builder::BEGIN@19 at line 60 of Config.pm |