← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:09 2016

Filename/usr/share/perl/5.18/if.pm
StatementsExecuted 46 statements in 554µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
411959µs1.00msif::::workif::work
44312µs12µsif::::importif::import
4117µs7µsif::::CORE:substif::CORE:subst (opcode)
0000s0sif::::unimportif::unimport
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package if;
2
31400ns$VERSION = '0.0602';
4
5
# spent 1.00ms (959µs+44µs) within if::work which was called 4 times, avg 251µs/call: # 4 times (959µs+44µs) by Devel::InnerPackage::BEGIN@7 or Module::Pluggable::Object::BEGIN@11 or Moose::Object::BEGIN@15 or Moose::Object::BEGIN@16 at line 18, avg 251µs/call
sub work {
642µs my $method = shift() ? 'import' : 'unimport';
741µs die "Too few arguments to 'use if' (some code returning an empty list in list context?)"
8 unless @_ >= 2;
94700ns return unless shift; # CONDITION
10
1141µs my $p = $_[0]; # PACKAGE
12416µs47µs (my $file = "$p.pm") =~ s!::!/!g;
# spent 7µs making 4 calls to if::CORE:subst, avg 2µs/call
134453µs require $file; # Works even if $_[0] is a keyword (like open)
14434µs47µs my $m = $p->can($method);
# spent 7µs making 4 calls to UNIVERSAL::can, avg 2µs/call
15415µs31.89ms goto &$m if $m;
# spent 1.74ms making 1 call to metaclass::import # spent 145µs making 2 calls to deprecate::import, avg 73µs/call
16}
17
181228µs41.00ms
# spent 12µs within if::import which was called 4 times, avg 3µs/call: # once (5µs+0s) by Moose::Object::BEGIN@15 at line 15 of Moose/Object.pm # once (4µs+0s) by Devel::InnerPackage::BEGIN@7 at line 7 of Devel/InnerPackage.pm # once (2µs+0s) by Module::Pluggable::Object::BEGIN@11 at line 11 of Module/Pluggable/Object.pm # once (2µs+0s) by Moose::Object::BEGIN@16 at line 16 of Moose/Object.pm
sub import { shift; unshift @_, 1; goto &work }
# spent 1.00ms making 4 calls to if::work, avg 251µs/call
19sub unimport { shift; unshift @_, 0; goto &work }
20
2112µs1;
22__END__
 
# spent 7µs within if::CORE:subst which was called 4 times, avg 2µs/call: # 4 times (7µs+0s) by if::work at line 12, avg 2µs/call
sub if::CORE:subst; # opcode