Filename | /home/hejohns/perl5/lib/perl5/Data/Printer/Filter.pm |
Statements | Executed 115 statements in 375µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
11 | 11 | 10 | 86µs | 163µs | __ANON__[:23] | Data::Printer::Filter::
10 | 10 | 10 | 77µs | 122µs | import | Data::Printer::Filter::
1 | 1 | 1 | 8µs | 8µs | BEGIN@2 | Data::Printer::Filter::
1 | 1 | 1 | 6µs | 6µs | BEGIN@4 | Data::Printer::Filter::
1 | 1 | 1 | 5µs | 8µs | BEGIN@26 | Data::Printer::Filter::
1 | 1 | 1 | 4µs | 14µs | BEGIN@5 | Data::Printer::Filter::
1 | 1 | 1 | 3µs | 13µs | BEGIN@3 | Data::Printer::Filter::
1 | 1 | 1 | 200ns | 200ns | __ANON__ (xsub) | Data::Printer::Filter::
0 | 0 | 0 | 0s | 0s | __ANON__[:22] | Data::Printer::Filter::
0 | 0 | 0 | 0s | 0s | __ANON__[:28] | Data::Printer::Filter::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Data::Printer::Filter; | ||||
2 | 2 | 14µs | 2 | 10µ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 # spent 8µs making 1 call to Data::Printer::Filter::BEGIN@2
# spent 1µs making 1 call to strict::import |
3 | 2 | 11µs | 2 | 24µ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 # spent 13µs making 1 call to Data::Printer::Filter::BEGIN@3
# spent 10µs making 1 call to warnings::import |
4 | 2 | 14µs | 2 | 6µ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 # spent 6µs making 1 call to Data::Printer::Filter::BEGIN@4
# spent 200ns making 1 call to Data::Printer::Filter::__ANON__ |
5 | 2 | 104µs | 2 | 24µ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 # 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 | ||||
8 | 10 | 10µs | 10 | 45µs | my $caller = caller; # spent 45µs making 10 calls to Contextual::Return::__ANON__[Contextual/Return.pm:30], avg 4µs/call |
9 | |||||
10 | 10 | 2µ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 | ||||
12 | 11 | 5µs | my ($name, $code) = @_; | ||
13 | 11 | 40µs | 11 | 11µ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 | |||||
18 | 11 | 10µs | 11 | 65µ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); | ||||
22 | 11 | 44µs | }; | ||
23 | 10 | 17µs | }; | ||
24 | |||||
25 | { | ||||
26 | 12 | 66µs | 2 | 11µ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 # spent 8µs making 1 call to Data::Printer::Filter::BEGIN@26
# spent 3µs making 1 call to strict::unimport |
27 | 10 | 17µs | *{"$caller\::filter"} = $filter; | ||
28 | 10 | 19µs | *{"$caller\::_filter_list"} = sub { \%_filters_for }; | ||
29 | } | ||||
30 | }; | ||||
31 | |||||
32 | 1 | 2µs | 1; | ||
33 | __END__ | ||||
# spent 200ns within Data::Printer::Filter::__ANON__ which was called:
# once (200ns+0s) by Data::Printer::Filter::BEGIN@4 at line 4 |