← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:23 2010

File /usr/local/lib/perl5/5.10.1/darwin-2level/Config.pm
Statements Executed 91
Statement Execution Time 756µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.34ms1.46msConfig::::AUTOLOADConfig::AUTOLOAD
55577µs77µsConfig::::importConfig::import
1613771µs1.62msConfig::::FETCHConfig::FETCH
11256µs56µsConfig::::CORE:substConfig::CORE:subst (opcode)
11224µs24µsConfig::::CORE:packConfig::CORE:pack (opcode)
21219µs19µsConfig::::CORE:substcontConfig::CORE:substcont (opcode)
11115µs19µsConfig::::BEGIN@9Config::BEGIN@9
11211µs11µsConfig::::CORE:unpackConfig::CORE:unpack (opcode)
1119µs9µsConfig::::TIEHASHConfig::TIEHASH
1118µs28µsConfig::::BEGIN@35Config::BEGIN@35
1122µs2µsConfig::::CORE:matchConfig::CORE:match (opcode)
0000s0sConfig::::DESTROYConfig::DESTROY
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# This file was created by configpm when Perl was built. Any changes
2# made to this file will be lost the next time perl is built.
3
4# for a description of the variables, please have a look at the
5# Glossary file, as written in the Porting folder, or use the url:
6# http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary
7
8package Config;
93114µs222µs
# spent 19µs (15+3) within Config::BEGIN@9 which was called # once (15µs+3µs) by Test::Builder::BEGIN@19 at line 9
use strict;
# spent 19µs making 1 call to Config::BEGIN@9 # spent 3µs making 1 call to strict::import
10# use warnings; Pulls in Carp
11# use vars pulls in Carp
1211µs@Config::EXPORT = qw(%Config);
131800ns@Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re);
14
15# Need to stub all the functions to make code such as print Config::config_sh
16# keep working
17
18sub myconfig;
19sub config_sh;
20sub config_vars;
21sub config_re;
22
2317µsmy %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
24
251100nsour %Config;
26
27# Define our own import method to avoid pulling in the full Exporter:
28
# spent 77µs within Config::import which was called 5 times, avg 15µs/call: # once (17µs+0s) by Errno::BEGIN@8 at line 8 of Errno.pm # once (17µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm # once (16µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm # once (15µs+0s) by lib::BEGIN@6 at line 6 of lib.pm # once (13µs+0s) by Test::Builder::BEGIN@19 at line 19 of Test/Builder.pm
sub import {
294093µs my $pkg = shift;
30 @_ = @Config::EXPORT unless @_;
31
32 my @funcs = grep $_ ne '%Config', @_;
33 my $export_Config = @funcs < @_ ? 1 : 0;
34
353286µs248µs
# spent 28µs (8+20) within Config::BEGIN@35 which was called # once (8µs+20µs) by Test::Builder::BEGIN@19 at line 35
no strict 'refs';
# spent 28µs making 1 call to Config::BEGIN@35 # spent 20µs making 1 call to strict::unimport
36 my $callpkg = caller(0);
37 foreach my $func (@funcs) {
38 die sprintf qq{"%s" is not exported by the %s module\n},
39 $func, __PACKAGE__ unless $Export_Cache{$func};
40 *{$callpkg.'::'.$func} = \&{$func};
41 }
42
43 *{"$callpkg\::Config"} = \%Config if $export_Config;
44 return;
45}
46
47121µs18µsdie "Perl lib version (5.10.1) doesn't match executable version ($])"
# spent 8µs making 1 call to version::(bool
48 unless $^V;
49
50116µs15µs$^V eq 5.10.1
# spent 5µs making 1 call to version::(cmp
51 or die "Perl lib version (5.10.1) doesn't match executable version (" .
52 sprintf("v%vd",$^V) . ")";
53
54
55
# spent 1.62ms (71µs+1.55) within Config::FETCH which was called 16 times, avg 101µs/call: # 3 times (24µs+1.52ms) by base::import at line 43 of DynaLoader.pm, avg 516µs/call # 2 times (8µs+0s) by LWP::Protocol::http::BEGIN@216 at line 11 of Errno.pm, avg 4µs/call # once (10µs+30µs) by LWP::UserAgent::BEGIN@12 at line 38 of Time/Local.pm # once (6µs+0s) by main::BEGIN@3 at line 10 of lib.pm # once (6µs+0s) by Module::Find::BEGIN@8 at line 378 of Cwd.pm # once (3µs+0s) by Test::Builder::BEGIN@18 at line 22 of Test/Builder.pm # once (3µs+0s) by Module::Find::BEGIN@8 at line 1337 of File/Find.pm # once (2µs+0s) by main::BEGIN@3 at line 12 of lib.pm # once (2µs+0s) by main::BEGIN@3 at line 11 of lib.pm # once (2µs+0s) by base::import at line 65 of DynaLoader.pm # once (2µs+0s) by base::import at line 68 of DynaLoader.pm # once (2µs+0s) by base::import at line 70 of DynaLoader.pm # once (1µs+0s) by base::import at line 69 of DynaLoader.pm
sub FETCH {
563587µs my($self, $key) = @_;
57
58 # check for cached value (which may be undef so we use exists not defined)
59 return $self->{$key} if exists $self->{$key};
60
61 return $self->fetch_string($key);
# spent 1.46ms making 1 call to Config::AUTOLOAD # spent 56µs making 2 calls to Config::fetch_string, avg 28µs/call
62}
63
# spent 9µs within Config::TIEHASH which was called # once (9µs+0s) by Test::Builder::BEGIN@19 at line 76
sub TIEHASH {
64111µs bless $_[1], $_[0];
65}
66
67sub DESTROY { }
68
69
# spent 1.46ms (1.34+124µs) within Config::AUTOLOAD which was called # once (1.34ms+124µs) by Config::FETCH at line 61
sub AUTOLOAD {
70274µs require 'Config_heavy.pl';
71 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 9µs making 1 call to Config::launcher # spent 2µs making 1 call to Config::CORE:match
72 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
73}
74
75# tie returns the object, so the value returned to require will be true.
76144µs19µstie %Config, 'Config', {
# spent 9µs making 1 call to Config::TIEHASH
77 archlibexp => '/usr/local/lib/perl5/5.10.1/darwin-2level',
78 archname => 'darwin-2level',
79 cc => 'cc',
80 d_readlink => 'define',
81 d_symlink => 'define',
82 dlsrc => 'dl_dlopen.xs',
83 dont_use_nlink => undef,
84 exe_ext => '',
85 inc_version_list => ' ',
86 intsize => '4',
87 ldlibpthname => 'DYLD_LIBRARY_PATH',
88 libpth => '/usr/local/lib /usr/lib',
89 osname => 'darwin',
90 osvers => '10.2.0',
91 path_sep => ':',
92 privlibexp => '/usr/local/lib/perl5/5.10.1',
93 scriptdir => '/usr/local/bin',
94 sitearchexp => '/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level',
95 sitelibexp => '/usr/local/lib/perl5/site_perl/5.10.1',
96 useithreads => undef,
97 usevendorprefix => undef,
98 version => '5.10.1',
99};
# spent 2µs within Config::CORE:match which was called # once (2µs+0s) by Config::AUTOLOAD at line 71 of Config.pm
sub Config::CORE:match; # xsub
# spent 24µs within Config::CORE:pack which was called # once (24µs+0s) by Config::AUTOLOAD at line 1170 of Config_heavy.pl
sub Config::CORE:pack; # xsub
# spent 56µs within Config::CORE:subst which was called # once (56µs+0s) by Config::AUTOLOAD at line 1171 of Config_heavy.pl
sub Config::CORE:subst; # xsub
# spent 19µs within Config::CORE:substcont which was called 2 times, avg 9µs/call: # 2 times (19µs+0s) by Config::AUTOLOAD at line 1171 of Config_heavy.pl, avg 9µs/call
sub Config::CORE:substcont; # xsub
# spent 11µs within Config::CORE:unpack which was called # once (11µs+0s) by Config::AUTOLOAD at line 1170 of Config_heavy.pl
sub Config::CORE:unpack; # xsub