← Index
NYTProf Performance Profile   « line view »
For opt.pl
  Run on Wed May 13 13:47:05 2015
Reported on Wed May 13 13:47:06 2015

Filename/home/lbr/project/petal-tiny/opt.pl
StatementsExecuted 2202 statements in 23.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
50112.89ms7.57msmain::::CORE:readline main::CORE:readline (opcode)
1112.18ms5.19msmain::::BEGIN@2 main::BEGIN@2
5011990µs8.53msmain::::CORE:open main::CORE:open (opcode)
57011478µs478µsmain::::__ANON__[opt.pl:19] main::__ANON__[opt.pl:19]
111433µs3.81msmain::::BEGIN@1 main::BEGIN@1
45011228µs228µsmain::::__ANON__[opt.pl:17] main::__ANON__[opt.pl:17]
37011213µs213µsmain::::__ANON__[opt.pl:18] main::__ANON__[opt.pl:18]
21011205µs205µsUNIVERSAL::::canUNIVERSAL::can (xsub)
5011186µs186µsmain::::CORE:close main::CORE:close (opcode)
111163µs6.41msmain::::BEGIN@53 main::BEGIN@53
18011101µs101µsmain::::__ANON__[opt.pl:16] main::__ANON__[opt.pl:16]
801142µs42µsmain::::__ANON__[opt.pl:14] main::__ANON__[opt.pl:14]
601139µs39µsmain::::__ANON__[opt.pl:13] main::__ANON__[opt.pl:13]
501136µs36µsmain::::__ANON__[opt.pl:12] main::__ANON__[opt.pl:12]
11134µs34µsmain::::CORE:print main::CORE:print (opcode)
401132µs32µsmain::::__ANON__[opt.pl:15] main::__ANON__[opt.pl:15]
301123µs23µsmain::::__ANON__[opt.pl:11] main::__ANON__[opt.pl:11]
101120µs20µsmain::::__ANON__[opt.pl:8] main::__ANON__[opt.pl:8]
201119µs19µsmain::::__ANON__[opt.pl:10] main::__ANON__[opt.pl:10]
101113µs13µsmain::::__ANON__[opt.pl:9] main::__ANON__[opt.pl:9]
101110µs10µsmain::::__ANON__[opt.pl:25] main::__ANON__[opt.pl:25]
1118µs8µsUNIVERSAL::::VERSIONUNIVERSAL::VERSION (xsub)
1114µs4µsversion::::(bool version::(bool (xsub)
1113µs3µsversion::::(cmp version::(cmp (xsub)
4312µs2µsInternals::::SvREADONLYInternals::SvREADONLY (xsub)
2112µs2µsmro::::method_changed_in mro::method_changed_in (xsub)
0000s0smain::::RUNTIME main::RUNTIME
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
016.41msProfile data that couldn't be associated with a specific line:
# spent 6.41ms making 1 call to main::BEGIN@53
12130µs23.85ms
# spent 3.81ms (433µs+3.38) within main::BEGIN@1 which was called: # once (433µs+3.38ms) by main::NULL at line 1
use lib "lib";
# spent 3.81ms making 1 call to main::BEGIN@1 # spent 39µs making 1 call to lib::import
22302µs15.19ms
# spent 5.19ms (2.18+3.00) within main::BEGIN@2 which was called: # once (2.18ms+3.00ms) by main::NULL at line 2
use Petal::Tiny;
# spent 5.19ms making 1 call to main::BEGIN@2
3
4142µs134µsprint $INC{"Petal/Tiny.pm"}, "\n";
# spent 34µs making 1 call to main::CORE:print
5
6my $stash = {
7 h => {
81018µs
# spent 20µs within main::__ANON__[opt.pl:8] which was called 10 times, avg 2µs/call: # 10 times (20µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 2µs/call
content => sub { "" },
91015µs
# spent 13µs within main::__ANON__[opt.pl:9] which was called 10 times, avg 1µs/call: # 10 times (13µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 1µs/call
csrf_field => sub { "" },
102026µs
# spent 19µs within main::__ANON__[opt.pl:10] which was called 20 times, avg 965ns/call: # 20 times (19µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 965ns/call
compare => sub { 0 },
113035µs
# spent 23µs within main::__ANON__[opt.pl:11] which was called 30 times, avg 777ns/call: # 30 times (23µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 777ns/call
include => sub { "" },
125057µs
# spent 36µs within main::__ANON__[opt.pl:12] which was called 50 times, avg 720ns/call: # 50 times (36µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 720ns/call
wiz_class => sub { "" },
136065µs
# spent 39µs within main::__ANON__[opt.pl:13] which was called 60 times, avg 657ns/call: # 60 times (39µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 657ns/call
checked => sub { undef },
148086µs
# spent 42µs within main::__ANON__[opt.pl:14] which was called 80 times, avg 530ns/call: # 80 times (42µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 530ns/call
selected => sub { undef },
154050µs
# spent 32µs within main::__ANON__[opt.pl:15] which was called 40 times, avg 805ns/call: # 40 times (32µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 805ns/call
url_for => sub { "https://who.cares" },
16180193µs
# spent 101µs within main::__ANON__[opt.pl:16] which was called 180 times, avg 561ns/call: # 180 times (101µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 561ns/call
inputvalue => sub { "" },
17450465µs
# spent 228µs within main::__ANON__[opt.pl:17] which was called 450 times, avg 506ns/call: # 450 times (228µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 506ns/call
error_class => sub { undef },
18370399µs
# spent 213µs within main::__ANON__[opt.pl:18] which was called 370 times, avg 575ns/call: # 370 times (213µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 575ns/call
l => sub { shift },
195706.58ms
# spent 478µs within main::__ANON__[opt.pl:19] which was called 570 times, avg 838ns/call: # 570 times (478µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 838ns/call
L => sub { ucfirst shift },
20 },
21 c => {
22 validation => {
23 failed => [],
24 },
251014µs
# spent 10µs within main::__ANON__[opt.pl:25] which was called 10 times, avg 1µs/call: # 10 times (10µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 1µs/call
url_for => sub { "http://who.cares" },
26 },
27119µs '__wizard_values__' => {
28 pages => 'contact',
29 },
30 'action' => 'add',
31 'dk_domain_name' => 'munk.dk',
32 'lang' => 'da',
33 'payer' => undef,
34 'user' => undef,
35 'contact' => undef,
36 'controller' => 'domain-waitinglist',
37 'domain_wait_count' => '6',
38};
39
401900nsmy @files = qw/
41 add.html.tal
42 add_show_info.html.tal
43 add_show_info.html.tal
44 default.html.tal
45 wizard.html.tal
46/;
47
481200nsmy $encoding = ":encoding(UTF-8)";
491100nsmy $tal_ns = q{xmlns:tal="http://purl.org/petal/1.0/"};
50
51112µsfor (1..10) {
52109µsfor my $file (@files) {
53521.23ms20115.9ms
# spent 6.41ms (163µs+6.25) within main::BEGIN@53 which was called: # once (163µs+6.25ms) by main::CORE:open at line 0
open my $f, "<$encoding", "opt/$file" or die;
# spent 8.53ms making 50 calls to main::CORE:open, avg 171µs/call # spent 6.25ms making 1 call to PerlIO::import # spent 793µs making 50 calls to Encode::find_encoding, avg 16µs/call # spent 309µs making 50 calls to Encode::Encoding::renew, avg 6µs/call # spent 28µs making 50 calls to Encode::Encoding::needs_lines, avg 556ns/call
54507.74ms73012.4ms my $xml = join "", <$f>;
# spent 7.57ms making 50 calls to main::CORE:readline, avg 151µs/call # spent 4.68ms making 340 calls to Encode::utf8::decode_xs, avg 14µs/call # spent 181µs making 340 calls to Encode::Encoding::renewed, avg 531ns/call
55505.60ms50186µs close $f;
# spent 186µs making 50 calls to main::CORE:close, avg 4µs/call
56
5750169µs $xml = "<div $tal_ns>$xml</div>";
58
5950146µs50525µs my $template = Petal::Tiny->new($xml);
# spent 525µs making 50 calls to Petal::Tiny::new, avg 11µs/call
6050275µs50524ms $template->process(%$stash);
# spent 524ms making 50 calls to Petal::Tiny::process, avg 10.5ms/call
61}
62}
 
# spent 2µs within Internals::SvREADONLY which was called 4 times, avg 600ns/call: # 2 times (1µs+0s) by constant::import at line 149 of constant.pm, avg 650ns/call # once (800ns+0s) by constant::BEGIN@24 at line 32 of constant.pm # once (300ns+0s) by constant::BEGIN@24 at line 33 of constant.pm
sub Internals::SvREADONLY; # xsub
# spent 8µs within UNIVERSAL::VERSION which was called: # once (8µs+0s) by Encode::BEGIN@12 at line 12 of Encode.pm
sub UNIVERSAL::VERSION; # xsub
# spent 205µs within UNIVERSAL::can which was called 210 times, avg 977ns/call: # 210 times (205µs+0s) by Petal::Tiny::resolve at line 295 of lib/Petal/Tiny.pm, avg 977ns/call
sub UNIVERSAL::can; # xsub
# spent 186µs within main::CORE:close which was called 50 times, avg 4µs/call: # 50 times (186µs+0s) by main::RUNTIME at line 55, avg 4µs/call
sub main::CORE:close; # opcode
# spent 8.53ms (990µs+7.54) within main::CORE:open which was called 50 times, avg 171µs/call: # 50 times (990µs+7.54ms) by main::RUNTIME at line 53, avg 171µs/call
sub main::CORE:open; # opcode
# spent 34µs within main::CORE:print which was called: # once (34µs+0s) by main::RUNTIME at line 4
sub main::CORE:print; # opcode
# spent 7.57ms (2.89+4.68) within main::CORE:readline which was called 50 times, avg 151µs/call: # 50 times (2.89ms+4.68ms) by main::RUNTIME at line 54, avg 151µs/call
sub main::CORE:readline; # opcode
# spent 2µs within mro::method_changed_in which was called 2 times, avg 900ns/call: # 2 times (2µs+0s) by constant::import at line 182 of constant.pm, avg 900ns/call
sub mro::method_changed_in; # xsub
# spent 4µs within version::(bool which was called: # once (4µs+0s) by lib::BEGIN@6 at line 59 of Config.pm
sub version::(bool; # xsub
# spent 3µs within version::(cmp which was called: # once (3µs+0s) by lib::BEGIN@6 at line 62 of Config.pm
sub version::(cmp; # xsub