← Index
NYTProf Performance Profile   « line view »
For flows_to_es.pl
  Run on Mon May 9 23:27:59 2016
Reported on Mon May 9 23:28:08 2016

Filename/usr/share/perl/5.18/vars.pm
StatementsExecuted 228 statements in 1.27ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
151513496µs618µsvars::::importvars::import
111212µs308µsvars::::BEGIN@7vars::BEGIN@7
12031121µs121µsvars::::CORE:matchvars::CORE:match (opcode)
11116µs16µsvars::::BEGIN@3vars::BEGIN@3
1117µs19µ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
3260µs116µs
# spent 16µs within vars::BEGIN@3 which was called: # once (16µs+0s) by File::Spec::BEGIN@4 at line 3
use 5.006;
# spent 16µs making 1 call to vars::BEGIN@3
4
51800nsour $VERSION = '1.03';
6
72237µs2404µs
# spent 308µs (212+96) within vars::BEGIN@7 which was called: # once (212µs+96µs) by File::Spec::BEGIN@4 at line 7
use warnings::register;
# spent 308µs making 1 call to vars::BEGIN@7 # spent 96µs making 1 call to warnings::register::import
82309µs231µs
# spent 19µs (7+12) within vars::BEGIN@8 which was called: # once (7µs+12µs) by File::Spec::BEGIN@4 at line 8
use strict qw(vars subs);
# spent 19µs making 1 call to vars::BEGIN@8 # spent 12µs making 1 call to strict::import
9
10
# spent 618µs (496+121) within vars::import which was called 15 times, avg 41µs/call: # once (53µs+10µs) by URI::BEGIN@13 at line 13 of URI.pm # once (50µs+11µs) by Math::Round::BEGIN@5 at line 5 of Math/Round.pm # once (43µs+10µs) by Params::Util::BEGIN@65 at line 65 of /opt/flows/lib/lib/perl5/x86_64-linux-gnu-thread-multi/Params/Util.pm # once (43µs+10µs) by File::Path::BEGIN@19 at line 19 of File/Path.pm # once (42µs+10µs) by Cwd::BEGIN@5 at line 5 of Cwd.pm # once (32µs+16µs) by Config::BEGIN@7 at line 7 of Config_heavy.pl # once (35µs+9µs) by Storable::BEGIN@22 at line 22 of Storable.pm # once (33µs+6µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (31µs+7µs) by URI::BEGIN@7 at line 7 of URI.pm # once (28µs+6µs) by IO::Select::BEGIN@11 at line 11 of IO/Select.pm # once (26µs+7µs) by constant::BEGIN@6 at line 6 of constant.pm # once (24µs+6µs) by Config::BEGIN@11 at line 11 of Config.pm # once (24µs+5µs) by URI::BEGIN@4 at line 4 of URI.pm # once (17µs+4µs) by base::BEGIN@4 at line 4 of base.pm # once (17µs+4µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm
sub import {
111513µs my $callpack = caller;
121524µs my (undef, @imports) = @_;
13153µs my ($sym, $ch);
141578µs foreach (@imports) {
1540246µs4085µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 85µs making 40 calls to vars::CORE:match, avg 2µs/call
164076µs4021µs if ($sym =~ /\W/) {
# spent 21µs making 40 calls to vars::CORE:match, avg 515ns/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 }
284088µs4016µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 16µs making 40 calls to vars::CORE:match, avg 398ns/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
3540130µs : 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 121µs within vars::CORE:match which was called 120 times, avg 1µs/call: # 40 times (85µs+0s) by vars::import at line 15, avg 2µs/call # 40 times (21µs+0s) by vars::import at line 16, avg 515ns/call # 40 times (16µs+0s) by vars::import at line 28, avg 398ns/call
sub vars::CORE:match; # opcode