← Index
NYTProf Performance Profile   « line view »
For split.pl
  Run on Thu Apr 20 02:05:47 2023
Reported on Thu Apr 20 18:31:10 2023

Filename/home/hejohns/perl5/lib/perl5/Data/Printer/Filter.pm
StatementsExecuted 115 statements in 375µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111086µs163µsData::Printer::Filter::::__ANON__[:23]Data::Printer::Filter::__ANON__[:23]
10101077µs122µsData::Printer::Filter::::importData::Printer::Filter::import
1118µs8µsData::Printer::Filter::::BEGIN@2Data::Printer::Filter::BEGIN@2
1116µs6µsData::Printer::Filter::::BEGIN@4Data::Printer::Filter::BEGIN@4
1115µs8µsData::Printer::Filter::::BEGIN@26Data::Printer::Filter::BEGIN@26
1114µs14µsData::Printer::Filter::::BEGIN@5Data::Printer::Filter::BEGIN@5
1113µs13µsData::Printer::Filter::::BEGIN@3Data::Printer::Filter::BEGIN@3
111200ns200nsData::Printer::Filter::::__ANON__Data::Printer::Filter::__ANON__ (xsub)
0000s0sData::Printer::Filter::::__ANON__[:22]Data::Printer::Filter::__ANON__[:22]
0000s0sData::Printer::Filter::::__ANON__[:28]Data::Printer::Filter::__ANON__[:28]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Data::Printer::Filter;
2214µs210µs
# spent 8µs (8+1000ns) within Data::Printer::Filter::BEGIN@2 which was called: # once (8µs+1000ns) by Data::Printer::Filter::SCALAR::BEGIN@4 at line 2
use strict;
# spent 8µs making 1 call to Data::Printer::Filter::BEGIN@2 # spent 1µs making 1 call to strict::import
3211µs224µs
# spent 13µs (3+10) within Data::Printer::Filter::BEGIN@3 which was called: # once (3µs+10µs) by Data::Printer::Filter::SCALAR::BEGIN@4 at line 3
use warnings;
# spent 13µs making 1 call to Data::Printer::Filter::BEGIN@3 # spent 10µs making 1 call to warnings::import
4214µs26µs
# spent 6µs (6+200ns) within Data::Printer::Filter::BEGIN@4 which was called: # once (6µs+200ns) by Data::Printer::Filter::SCALAR::BEGIN@4 at line 4
use Data::Printer::Common;
# spent 6µs making 1 call to Data::Printer::Filter::BEGIN@4 # spent 200ns making 1 call to Data::Printer::Filter::__ANON__
52104µs224µs
# spent 14µs (4+10) within Data::Printer::Filter::BEGIN@5 which was called: # once (4µs+10µs) by Data::Printer::Filter::SCALAR::BEGIN@4 at line 5
use Scalar::Util;
# spent 14µs making 1 call to Data::Printer::Filter::BEGIN@5 # spent 10µs making 1 call to Exporter::import
6
7
# spent 122µs (77+45) within Data::Printer::Filter::import which was called 10 times, avg 12µs/call: # once (13µs+4µs) by Data::Printer::Filter::HASH::BEGIN@4 at line 4 of Data/Printer/Filter/HASH.pm # once (9µs+5µs) by Data::Printer::Filter::SCALAR::BEGIN@4 at line 4 of Data/Printer/Filter/SCALAR.pm # once (7µs+7µs) by Data::Printer::Filter::FORMAT::BEGIN@4 at line 4 of Data/Printer/Filter/FORMAT.pm # once (6µs+6µs) by Data::Printer::Filter::Regexp::BEGIN@4 at line 4 of Data/Printer/Filter/Regexp.pm # once (8µs+4µs) by Data::Printer::Filter::GLOB::BEGIN@4 at line 4 of Data/Printer/Filter/GLOB.pm # once (8µs+4µs) by Data::Printer::Filter::GenericClass::BEGIN@4 at line 4 of Data/Printer/Filter/GenericClass.pm # once (7µs+4µs) by Data::Printer::Filter::REF::BEGIN@4 at line 4 of Data/Printer/Filter/REF.pm # once (7µs+4µs) by Data::Printer::Filter::ARRAY::BEGIN@4 at line 4 of Data/Printer/Filter/ARRAY.pm # once (6µs+3µs) by Data::Printer::Filter::VSTRING::BEGIN@4 at line 4 of Data/Printer/Filter/VSTRING.pm # once (6µs+3µs) by Data::Printer::Filter::CODE::BEGIN@4 at line 4 of Data/Printer/Filter/CODE.pm
sub import {
81010µs1045µs my $caller = caller;
# spent 45µs making 10 calls to Contextual::Return::__ANON__[Contextual/Return.pm:30], avg 4µs/call
9
10102µs my %_filters_for = ();
11
# spent 163µs (86+76) within Data::Printer::Filter::__ANON__[/home/hejohns/perl5/lib/perl5/Data/Printer/Filter.pm:23] which was called 11 times, avg 15µs/call: # once (10µs+11µs) by Data::Printer::Object::BEGIN@52 at line 7 of Data/Printer/Filter/SCALAR.pm # once (11µs+10µs) by Data::Printer::Object::BEGIN@56 at line 7 of Data/Printer/Filter/VSTRING.pm # once (9µs+7µs) by Data::Printer::Object::BEGIN@61 at line 184 of Data/Printer/Filter/GenericClass.pm # once (8µs+8µs) by Data::Printer::Object::BEGIN@57 at line 9 of Data/Printer/Filter/GLOB.pm # once (8µs+7µs) by Data::Printer::Object::BEGIN@54 at line 8 of Data/Printer/Filter/HASH.pm # once (8µs+7µs) by Data::Printer::Object::BEGIN@53 at line 8 of Data/Printer/Filter/ARRAY.pm # once (8µs+6µs) by Data::Printer::Object::BEGIN@60 at line 9 of Data/Printer/Filter/CODE.pm # once (7µs+6µs) by Data::Printer::Object::BEGIN@55 at line 7 of Data/Printer/Filter/REF.pm # once (6µs+6µs) by Data::Printer::Object::BEGIN@58 at line 6 of Data/Printer/Filter/FORMAT.pm # once (6µs+5µs) by Data::Printer::Object::BEGIN@59 at line 30 of Data/Printer/Filter/Regexp.pm # once (4µs+4µs) by Data::Printer::Object::BEGIN@52 at line 15 of Data/Printer/Filter/SCALAR.pm
my $filter = sub {
12115µs my ($name, $code) = @_;
131140µs1111µs Data::Printer::Common::_die( "syntax: filter 'Class', sub { ... }" )
# spent 11µs making 11 calls to Scalar::Util::reftype, avg 1µs/call
14 unless defined $name
15 && defined $code
16 && Scalar::Util::reftype($code) eq 'CODE';
17
181110µs1165µs my $target = Data::Printer::Common::_filter_category_for($name);
# spent 65µs making 11 calls to Data::Printer::Common::_filter_category_for, avg 6µs/call
19 unshift @{$_filters_for{$target}{$name}}, sub {
20 my ($item, $ddp) = @_;
21 $code->($item, $ddp);
221144µs };
231017µs };
24
25 {
261266µs211µs
# spent 8µs (5+3) within Data::Printer::Filter::BEGIN@26 which was called: # once (5µs+3µs) by Data::Printer::Filter::SCALAR::BEGIN@4 at line 26
no strict 'refs';
# spent 8µs making 1 call to Data::Printer::Filter::BEGIN@26 # spent 3µs making 1 call to strict::unimport
271017µs *{"$caller\::filter"} = $filter;
281019µs *{"$caller\::_filter_list"} = sub { \%_filters_for };
29 }
30};
31
3212µs1;
33__END__
 
# spent 200ns within Data::Printer::Filter::__ANON__ which was called: # once (200ns+0s) by Data::Printer::Filter::BEGIN@4 at line 4
sub Data::Printer::Filter::__ANON__; # xsub