← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:08 2014

Filename/usr/share/perl/5.14/vars.pm
StatementsExecuted 992 statements in 3.01ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
6262551.89ms2.36msvars::::importvars::import
55231465µs465µsvars::::CORE:matchvars::CORE:match (opcode)
111174µs241µsvars::::BEGIN@7vars::BEGIN@7
11144µs44µsvars::::BEGIN@3vars::BEGIN@3
1115µs16µsvars::::BEGIN@8vars::BEGIN@8
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package vars;
2
3268µs144µs
# spent 44µs within vars::BEGIN@3 which was called: # once (44µs+0s) by Time::HiRes::BEGIN@4 at line 3
use 5.006;
# spent 44µs making 1 call to vars::BEGIN@3
4
51800nsour $VERSION = '1.02';
6
72192µs2308µs
# spent 241µs (174+67) within vars::BEGIN@7 which was called: # once (174µs+67µs) by Time::HiRes::BEGIN@4 at line 7
use warnings::register;
# spent 241µs making 1 call to vars::BEGIN@7 # spent 66µs making 1 call to warnings::register::import
82276µs226µs
# spent 16µs (5+11) within vars::BEGIN@8 which was called: # once (5µs+11µs) by Time::HiRes::BEGIN@4 at line 8
use strict qw(vars subs);
# spent 16µs making 1 call to vars::BEGIN@8 # spent 10µs making 1 call to strict::import
9
10
# spent 2.36ms (1.89+465µs) within vars::import which was called 62 times, avg 38µs/call: # once (92µs+22µs) by Mail::Sendmail::BEGIN@39 at line 39 of Mail/Sendmail.pm # once (72µs+18µs) by Math::BigInt::BEGIN@28 at line 28 of Math/BigInt.pm # once (72µs+17µs) by Value::Convertor::BEGIN@154 at line 154 of Value/Convertor.pm # once (63µs+14µs) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm # once (59µs+11µs) by DateTime::TimeZone::OlsonDB::BEGIN@12 at line 12 of DateTime/TimeZone/OlsonDB.pm # once (46µs+12µs) by DateTime::TimeZone::Catalog::BEGIN@18 at line 18 of DateTime/TimeZone/Catalog.pm # once (46µs+11µs) by POSIX::SigRt::BEGIN@60 at line 60 of POSIX.pm # once (49µs+7µs) by Storable::BEGIN@22 at line 22 of Storable.pm # once (43µs+11µs) by Sys::Hostname::Long::BEGIN@12 at line 12 of Sys/Hostname/Long.pm # once (42µs+11µs) by Clone::BEGIN@6 at line 6 of Clone.pm # once (37µs+16µs) by Time::Local::BEGIN@8 at line 8 of Time/Local.pm # once (40µs+10µs) by Time::Zone::BEGIN@47 at line 47 of Time/Zone.pm # once (40µs+9µs) by Readonly::BEGIN@171 at line 171 of Readonly.pm # once (39µs+10µs) by List::MoreUtils::BEGIN@8 at line 8 of List/MoreUtils.pm # once (39µs+9µs) by Log::Writer::Syslog::BEGIN@83 at line 83 of Log/Writer/Syslog.pm # once (38µs+9µs) by Time::Zone::BEGIN@149 at line 148 of Time/Zone.pm # once (36µs+9µs) by Params::Util::BEGIN@65 at line 65 of Params/Util.pm # once (36µs+9µs) by Date::Parse::BEGIN@207 at line 207 of Date/Parse.pm # once (35µs+9µs) by Cwd::BEGIN@5 at line 5 of Cwd.pm # once (35µs+8µs) by MIME::Base64::BEGIN@4 at line 4 of MIME/Base64.pm # once (32µs+8µs) by Log::Writer::Handle::BEGIN@125 at line 125 of Log/Writer/Handle.pm # once (30µs+7µs) by Log::Writer::Email::BEGIN@83 at line 83 of Log/Writer/Email.pm # once (29µs+8µs) by Digest::MD5::BEGIN@4 at line 4 of Digest/MD5.pm # once (31µs+7µs) by Mentat::Storage::Mongo::BEGIN@195 at line 195 of Mentat/Storage/Mongo.pm # once (29µs+8µs) by Date::Parse::BEGIN@9 at line 9 of Date/Parse.pm # once (30µs+8µs) by MIME::QuotedPrint::BEGIN@4 at line 4 of MIME/QuotedPrint.pm # once (29µs+8µs) by Params::Validate::BEGIN@15 at line 15 of Params/Validate.pm # once (29µs+7µs) by Log::Writer::File::BEGIN@78 at line 78 of Log/Writer/File.pm # once (29µs+7µs) by Log::Writer::Std::BEGIN@76 at line 76 of Log/Writer/Std.pm # once (28µs+8µs) by Readonly::XS::BEGIN@20 at line 20 of Readonly/XS.pm # once (29µs+7µs) by Readonly::BEGIN@35 at line 35 of Readonly.pm # once (27µs+8µs) by bigint::BEGIN@18 at line 18 of bigint.pm # once (28µs+6µs) by Mentat::Storage::BEGIN@82 at line 82 of Mentat/Storage.pm # once (28µs+6µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (28µs+6µs) by Log::Filter::Re::BEGIN@90 at line 90 of Log/Filter/Re.pm # once (26µs+6µs) by Log::Filter::Source::BEGIN@79 at line 79 of Log/Filter/Source.pm # once (25µs+6µs) by Log::Filter::Message::BEGIN@80 at line 80 of Log/Filter/Message.pm # once (25µs+6µs) by Readonly::BEGIN@32 at line 32 of Readonly.pm # once (25µs+6µs) by Log::Core::Essentials::BEGIN@79 at line 79 of Log/Core/Essentials.pm # once (24µs+6µs) by Log::Filter::All::BEGIN@75 at line 75 of Log/Filter/All.pm # once (23µs+5µs) by Log::Channel::Channel::BEGIN@78 at line 78 of Log/Channel/Channel.pm # once (22µs+6µs) by Log::Writer::Module::BEGIN@73 at line 73 of Log/Writer/Module.pm # once (22µs+6µs) by Log::Filter::Severity::BEGIN@79 at line 79 of Log/Filter/Severity.pm # once (22µs+5µs) by Log::Filter::None::BEGIN@75 at line 75 of Log/Filter/None.pm # once (22µs+5µs) by Log::Filter::Set::BEGIN@88 at line 88 of Log/Filter/Set.pm # once (21µs+6µs) by Log::Filter::Threshold::BEGIN@91 at line 91 of Log/Filter/Threshold.pm # once (21µs+6µs) by Tie::IxHash::BEGIN@15 at line 15 of Tie/IxHash.pm # once (20µs+5µs) by constant::BEGIN@6 at line 6 of constant.pm # once (16µs+4µs) by Log::Loger::BEGIN@140 at line 140 of Log/Loger.pm # once (16µs+4µs) by Mail::Sendmail::BEGIN@183 at line 183 of Mail/Sendmail.pm # once (14µs+4µs) by Config::BEGIN@11 at line 11 of Config.pm # once (15µs+4µs) by Sys::Syslog::BEGIN@78 at line 78 of Sys/Syslog.pm # once (14µs+4µs) by Net::CIDR::Lite::BEGIN@4 at line 4 of Net/CIDR/Lite.pm # once (14µs+3µs) by Log::Channel::Module::BEGIN@79 at line 79 of Log/Channel/Module.pm # once (14µs+4µs) by Log::Filter::Module::BEGIN@81 at line 81 of Log/Filter/Module.pm # once (14µs+4µs) by parent::BEGIN@3 at line 3 of parent.pm # once (13µs+4µs) by base::BEGIN@4 at line 4 of base.pm # once (13µs+4µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm # once (13µs+4µs) by Digest::base::BEGIN@4 at line 4 of Digest/base.pm # once (13µs+3µs) by Mutex::Flock::BEGIN@80 at line 80 of Mutex/Flock.pm # once (13µs+3µs) by Time::Zone::BEGIN@59 at line 59 of Time/Zone.pm # once (12µs+3µs) by Sys::Syslog::BEGIN@88 at line 88 of Sys/Syslog.pm
sub import {
11248380µs my $callpack = caller;
12 my (undef, @imports) = @_;
13 my ($sym, $ch);
14 foreach (@imports) {
157362.09ms184319µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 319µs making 184 calls to vars::CORE:match, avg 2µs/call
1618481µs if ($sym =~ /\W/) {
# spent 81µs making 184 calls to vars::CORE:match, avg 440ns/call
17 # time for a more-detailed check-up
18 if ($sym =~ /^\w+[[{].*[]}]$/) {
19 require Carp;
20 Carp::croak("Can't declare individual elements of hash or array");
21 } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) {
22 warnings::warn("No need to declare built-in vars");
23 } elsif (($^H &= strict::bits('vars'))) {
24 require Carp;
25 Carp::croak("'$_' is not a valid variable name under strict vars");
26 }
27 }
2818465µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 65µs making 184 calls to vars::CORE:match, avg 354ns/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
35 : do {
36 require Carp;
37 Carp::croak("'$_' is not a valid variable name");
38 });
39 } else {
40 require Carp;
41 Carp::croak("'$_' is not a valid variable name");
42 }
43 }
44};
45
4613µs1;
47__END__
 
# spent 465µs within vars::CORE:match which was called 552 times, avg 843ns/call: # 184 times (319µs+0s) by vars::import at line 15, avg 2µs/call # 184 times (81µs+0s) by vars::import at line 16, avg 440ns/call # 184 times (65µs+0s) by vars::import at line 28, avg 354ns/call
sub vars::CORE:match; # opcode