← Index
NYTProf Performance Profile   « line view »
For opt.pl
  Run on Tue May 12 15:32:29 2015
Reported on Tue May 12 15:32:30 2015

Filename/home/lbr/project/petal-tiny/opt.pl
StatementsExecuted 2052 statements in 14.3ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
50113.38ms8.41msmain::::CORE:readline main::CORE:readline (opcode)
1112.29ms5.45msmain::::BEGIN@2 main::BEGIN@2
50111.56ms9.88msmain::::CORE:open main::CORE:open (opcode)
56011559µs559µsmain::::__ANON__[opt.pl:19] main::__ANON__[opt.pl:19]
111391µs3.62msmain::::BEGIN@1 main::BEGIN@1
5011258µs258µsmain::::CORE:close main::CORE:close (opcode)
45011252µs252µsmain::::__ANON__[opt.pl:17] main::__ANON__[opt.pl:17]
29011203µs203µsmain::::__ANON__[opt.pl:18] main::__ANON__[opt.pl:18]
15011198µs198µsUNIVERSAL::::canUNIVERSAL::can (xsub)
111173µs6.57msmain::::BEGIN@53 main::BEGIN@53
18011117µs117µsmain::::__ANON__[opt.pl:16] main::__ANON__[opt.pl:16]
501158µs58µsmain::::__ANON__[opt.pl:12] main::__ANON__[opt.pl:12]
601157µs57µsmain::::__ANON__[opt.pl:13] main::__ANON__[opt.pl:13]
801155µs55µsmain::::__ANON__[opt.pl:14] main::__ANON__[opt.pl:14]
301140µs40µsmain::::__ANON__[opt.pl:11] main::__ANON__[opt.pl:11]
11134µs34µsmain::::CORE:print main::CORE:print (opcode)
101118µs18µsmain::::__ANON__[opt.pl:9] main::__ANON__[opt.pl:9]
101117µs17µsmain::::__ANON__[opt.pl:8] main::__ANON__[opt.pl:8]
101115µs15µ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
0000s0smain::::__ANON__[opt.pl:10] main::__ANON__[opt.pl:10]
0000s0smain::::__ANON__[opt.pl:15] main::__ANON__[opt.pl:15]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
016.57msProfile data that couldn't be associated with a specific line:
# spent 6.57ms making 1 call to main::BEGIN@53
1287µs23.66ms
# spent 3.62ms (391µs+3.22) within main::BEGIN@1 which was called: # once (391µs+3.22ms) by main::NULL at line 1
use lib "lib";
# spent 3.62ms making 1 call to main::BEGIN@1 # spent 41µs making 1 call to lib::import
22294µs15.45ms
# spent 5.45ms (2.29+3.17) within main::BEGIN@2 which was called: # once (2.29ms+3.17ms) by main::NULL at line 2
use Petal::Tiny;
# spent 5.45ms 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 17µs within main::__ANON__[opt.pl:8] which was called 10 times, avg 2µs/call: # 10 times (17µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 2µs/call
content => sub { "" },
91020µs
# spent 18µs within main::__ANON__[opt.pl:9] which was called 10 times, avg 2µs/call: # 10 times (18µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 2µs/call
csrf_field => sub { "" },
10 compare => sub { 0 },
113052µs
# spent 40µs within main::__ANON__[opt.pl:11] which was called 30 times, avg 1µs/call: # 30 times (40µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 1µs/call
include => sub { "" },
125077µs
# spent 58µs within main::__ANON__[opt.pl:12] which was called 50 times, avg 1µs/call: # 50 times (58µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 1µs/call
wiz_class => sub { "" },
136085µs
# spent 57µs within main::__ANON__[opt.pl:13] which was called 60 times, avg 955ns/call: # 60 times (57µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 955ns/call
checked => sub { undef },
148093µs
# spent 55µs within main::__ANON__[opt.pl:14] which was called 80 times, avg 682ns/call: # 80 times (55µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 682ns/call
selected => sub { undef },
15 url_for => sub { "https://who.cares" },
16180238µs
# spent 117µs within main::__ANON__[opt.pl:16] which was called 180 times, avg 651ns/call: # 180 times (117µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 651ns/call
inputvalue => sub { "" },
17450473µs
# spent 252µs within main::__ANON__[opt.pl:17] which was called 450 times, avg 560ns/call: # 450 times (252µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 560ns/call
error_class => sub { undef },
18290354µs
# spent 203µs within main::__ANON__[opt.pl:18] which was called 290 times, avg 700ns/call: # 290 times (203µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 700ns/call
l => sub { shift },
19560805µs
# spent 559µs within main::__ANON__[opt.pl:19] which was called 560 times, avg 998ns/call: # 560 times (559µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 998ns/call
L => sub { ucfirst shift },
20 },
21 c => {
22 validation => {
23 failed => [],
24 },
251017µs
# spent 15µs within main::__ANON__[opt.pl:25] which was called 10 times, avg 2µs/call: # 10 times (15µs+0s) by Petal::Tiny::resolve at line 339 of lib/Petal/Tiny.pm, avg 2µ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
4011µsmy @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
51115µsfor (1..10) {
521010µsfor my $file (@files) {
53521.88ms20118.0ms
# spent 6.57ms (173µs+6.40) within main::BEGIN@53 which was called: # once (173µs+6.40ms) by main::CORE:open at line 0
open my $f, "<$encoding", "opt/$file" or die;
# spent 9.88ms making 50 calls to main::CORE:open, avg 198µs/call # spent 6.40ms making 1 call to PerlIO::import # spent 1.23ms making 50 calls to Encode::find_encoding, avg 25µs/call # spent 476µs making 50 calls to Encode::Encoding::renew, avg 10µs/call # spent 47µs making 50 calls to Encode::Encoding::needs_lines, avg 934ns/call
54508.55ms73013.7ms my $xml = join "", <$f>;
# spent 8.41ms making 50 calls to main::CORE:readline, avg 168µs/call # spent 5.03ms making 340 calls to Encode::utf8::decode_xs, avg 15µs/call # spent 256µs making 340 calls to Encode::Encoding::renewed, avg 754ns/call
5550370µs50258µs close $f;
# spent 258µs making 50 calls to main::CORE:close, avg 5µs/call
56
5750246µs $xml = "<div $tal_ns>$xml</div>";
58
5950191µs50628µs my $template = Petal::Tiny->new($xml);
# spent 628µs making 50 calls to Petal::Tiny::new, avg 13µs/call
6050367µs50462ms $template->process(%$stash);
# spent 462ms making 50 calls to Petal::Tiny::process, avg 9.24ms/call
61}
62}
 
# spent 2µs within Internals::SvREADONLY which was called 4 times, avg 625ns/call: # 2 times (2µs+0s) by constant::import at line 149 of constant.pm, avg 750ns/call # once (700ns+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 198µs within UNIVERSAL::can which was called 150 times, avg 1µs/call: # 150 times (198µs+0s) by Petal::Tiny::resolve at line 295 of lib/Petal/Tiny.pm, avg 1µs/call
sub UNIVERSAL::can; # xsub
# spent 258µs within main::CORE:close which was called 50 times, avg 5µs/call: # 50 times (258µs+0s) by main::RUNTIME at line 55, avg 5µs/call
sub main::CORE:close; # opcode
# spent 9.88ms (1.56+8.32) within main::CORE:open which was called 50 times, avg 198µs/call: # 50 times (1.56ms+8.32ms) by main::RUNTIME at line 53, avg 198µ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 8.41ms (3.38+5.03) within main::CORE:readline which was called 50 times, avg 168µs/call: # 50 times (3.38ms+5.03ms) by main::RUNTIME at line 54, avg 168µ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