← Index
NYTProf Performance Profile   « block view • line view • sub view »
For ddd2.pl
  Run on Tue May 25 16:52:24 2010
Reported on Tue May 25 16:56:46 2010

File /project/perl/lib/version.pm
Statements Executed 27
Statement Execution Time 1.86ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
222118µs118µsversion::::importversion::import
22286µs462µsversion::::__ANON__[:32]version::__ANON__[:32]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#!perl -w
2package version;
3
4367µsuse 5.005_04;
5395µs123µsuse strict;
# spent 23µs making 1 call to strict::import
6
73309µs1355µsuse vars qw(@ISA $VERSION $CLASS *qv);
# spent 355µs making 1 call to vars::import
8
915µs$VERSION = "0.70";
10
1116µs$CLASS = 'version';
12
131488µs1151µseval "use version::vxs $VERSION";
# spent 151µs making 1 call to version::vxs::VERSION
14110µsif ( $@ ) { # don't have the XS version installed
15 eval "use version::vpp $VERSION"; # don't tempt fate
16 die "$@" if ( $@ );
17 push @ISA, "version::vpp";
18 *version::qv = \&version::vpp::qv;
19}
20else { # use XS module
21110µs push @ISA, "version::vxs";
2217µs *version::qv = \&version::vxs::qv;
23}
24
25# Preloaded methods go here.
26
# spent 118µs within version::import which was called 2 times, avg 59µs/call: # once (75µs+0s) by DBI::install_driver at line 20 of DBD/Pg.pm # once (43µs+0s) by base::import at line 10 of Class/DBI.pm
sub import {
276135µs my ($class) = shift;
28 my $callpkg = caller();
293238µs196µs no strict 'refs';
# spent 96µs making 1 call to strict::unimport
30
312466µs2376µs *{$callpkg."::qv"} =
# spent 376µs making 2 calls to version::vxs::qv, avg 188µs/call
32
# spent 462µs (86+376) within version::__ANON__[/project/perl/lib/version.pm:32] which was called 2 times, avg 231µs/call: # once (44µs+192µs) by base::import at line 10 of Class/DBI.pm # once (42µs+184µs) by DBI::install_driver at line 20 of DBD/Pg.pm
sub {return bless version::qv(shift), $class }
33 unless defined(&{"$callpkg\::qv"});
34
35# if (@_) { # must have initialization on the use line
36# if ( defined $_[2] ) { # CVS style
37# $_[0] = version::qv($_[2]);
38# }
39# else {
40# $_[0] = version->new($_[1]);
41# }
42# }
43}
44
45120µs1;