← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:31 2011

Filename/usr/share/perl/5.14/vars.pm
StatementsExecuted 640 statements in 5.57ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3535323.61ms4.60msvars::::importvars::import
36931994µs994µsvars::::CORE:matchvars::CORE:match (opcode)
111289µs552µsvars::::BEGIN@7vars::BEGIN@7
11156µs56µsvars::::BEGIN@3vars::BEGIN@3
11114µs49µ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
32112µs156µs
# spent 56µs within vars::BEGIN@3 which was called: # once (56µs+0s) by File::Spec::BEGIN@4 at line 3
use 5.006;
# spent 56µs making 1 call to vars::BEGIN@3
4
512µsour $VERSION = '1.02';
6
72315µs2815µs
# spent 552µs (289+263) within vars::BEGIN@7 which was called: # once (289µs+263µs) by File::Spec::BEGIN@4 at line 7
use warnings::register;
# spent 552µs making 1 call to vars::BEGIN@7 # spent 263µs making 1 call to warnings::register::import
82421µs284µs
# spent 49µs (14+35) within vars::BEGIN@8 which was called: # once (14µs+35µs) by File::Spec::BEGIN@4 at line 8
use strict qw(vars subs);
# spent 49µs making 1 call to vars::BEGIN@8 # spent 35µs making 1 call to strict::import
9
10
# spent 4.60ms (3.61+994µs) within vars::import which was called 35 times, avg 131µs/call: # once (234µs+59µs) by Foswiki::Plugins::SpreadSheetPlugin::BEGIN@11 at line 11 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/SpreadSheetPlugin.pm # once (229µs+62µs) by Foswiki::Plugins::AutoViewTemplatePlugin::BEGIN@16 at line 16 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/AutoViewTemplatePlugin.pm # once (205µs+57µs) by Foswiki::Plugins::TwistyPlugin::BEGIN@17 at line 17 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/TwistyPlugin.pm # once (142µs+86µs) by Foswiki::Plugins::SmiliesPlugin::BEGIN@12 at line 12 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/SmiliesPlugin.pm # once (154µs+42µs) by Foswiki::Plugins::RenderListPlugin::BEGIN@28 at line 28 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/RenderListPlugin.pm # once (139µs+36µs) by Time::Local::BEGIN@8 at line 8 of Time/Local.pm # once (136µs+35µs) by File::Temp::BEGIN@166 at line 166 of File/Temp.pm # once (134µs+37µs) by Foswiki::Plugins::SlideShowPlugin::BEGIN@8 at line 8 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/SlideShowPlugin.pm # once (132µs+37µs) by Digest::SHA::BEGIN@6 at line 6 of Digest/SHA.pm # once (128µs+37µs) by CGI::Util::BEGIN@4 at line 4 of CGI/Util.pm # once (126µs+35µs) by List::Util::BEGIN@12 at line 12 of List/Util.pm # once (126µs+34µs) by URI::BEGIN@13 at line 13 of URI.pm # once (114µs+32µs) by CGI::Session::Driver::file::BEGIN@11 at line 11 of /usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session/Driver/file.pm # once (113µs+31µs) by MIME::Base64::BEGIN@4 at line 4 of MIME/Base64.pm # once (112µs+31µs) by Foswiki::Plugins::JQueryPlugin::BEGIN@17 at line 17 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/JQueryPlugin.pm # once (112µs+30µs) by File::Path::BEGIN@19 at line 19 of File/Path.pm # once (111µs+30µs) by Foswiki::Plugins::HistoryPlugin::BEGIN@12 at line 12 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/HistoryPlugin.pm # once (107µs+29µs) by Scalar::Util::BEGIN@10 at line 10 of Scalar/Util.pm # once (101µs+28µs) by Cwd::BEGIN@172 at line 172 of Cwd.pm # once (89µs+24µs) by Digest::MD5::BEGIN@4 at line 4 of Digest/MD5.pm # once (86µs+22µs) by Error::subs::BEGIN@295 at line 295 of Error.pm # once (86µs+22µs) by Foswiki::Plugins::SubscribePlugin::BEGIN@7 at line 7 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/SubscribePlugin.pm # once (84µs+22µs) by URI::BEGIN@7 at line 7 of URI.pm # once (78µs+17µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (69µs+12µs) by URI::BEGIN@4 at line 4 of URI.pm # once (63µs+16µs) by Foswiki::BEGIN@18 at line 18 of setlib.cfg # once (59µs+15µs) by constant::BEGIN@6 at line 6 of constant.pm # once (60µs+12µs) by Foswiki::Users::BEGIN@300 at line 300 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Users.pm # once (46µs+9µs) by CGI::Session::Serialize::default::BEGIN@11 at line 11 of /usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session/Serialize/default.pm # once (41µs+10µs) by Error::BEGIN@15 at line 15 of Error.pm # once (40µs+11µs) by base::BEGIN@4 at line 4 of base.pm # once (40µs+10µs) by Foswiki::Plugins::PreferencesPlugin::BEGIN@33 at line 33 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/PreferencesPlugin.pm # once (38µs+8µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm # once (37µs+8µs) by Digest::base::BEGIN@4 at line 4 of Digest/base.pm # once (36µs+8µs) by Config::BEGIN@11 at line 11 of Config.pm
sub import {
116324.72ms my $callpack = caller;
12 my (undef, @imports) = @_;
13 my ($sym, $ch);
14 foreach (@imports) {
15123505µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 505µs making 123 calls to vars::CORE:match, avg 4µs/call
16123277µs if ($sym =~ /\W/) {
# spent 277µs making 123 calls to vars::CORE:match, avg 2µs/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 }
28123212µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 212µs making 123 calls to vars::CORE:match, avg 2µs/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
4615µs1;
47__END__
 
# spent 994µs within vars::CORE:match which was called 369 times, avg 3µs/call: # 123 times (505µs+0s) by vars::import at line 15, avg 4µs/call # 123 times (277µs+0s) by vars::import at line 16, avg 2µs/call # 123 times (212µs+0s) by vars::import at line 28, avg 2µs/call
sub vars::CORE:match; # opcode