← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:07 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Log/Any/Adapter/Base.pm
StatementsExecuted 49 statements in 244µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
191120µs20µsbase::::CORE:subst base::CORE:subst (opcode)
31116µs18µsLog::Any::Adapter::Base::::newLog::Any::Adapter::Base::new
1119µs9µsbase::::BEGIN@1 base::BEGIN@1
1115µs11µsLog::Any::Adapter::Base::::BEGIN@24Log::Any::Adapter::Base::BEGIN@24
19114µs4µsbase::::CORE:match base::CORE:match (opcode)
1114µs22µsLog::Any::Adapter::Base::::BEGIN@10Log::Any::Adapter::Base::BEGIN@10
1114µs5µsbase::::BEGIN@2 base::BEGIN@2
1113µs5µsbase::::BEGIN@3 base::BEGIN@3
3112µs2µsLog::Any::Adapter::Base::::initLog::Any::Adapter::Base::init
0000s0sLog::Any::Adapter::Base::::__ANON__[:28]Log::Any::Adapter::Base::__ANON__[:28]
0000s0sLog::Any::Adapter::Base::::__ANON__[:36]Log::Any::Adapter::Base::__ANON__[:36]
0000s0sLog::Any::Adapter::Base::::delegate_method_to_slotLog::Any::Adapter::Base::delegate_method_to_slot
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1222µs19µs
# spent 9µs within base::BEGIN@1 which was called: # once (9µs+0s) by base::import at line 1
use 5.008001;
# spent 9µs making 1 call to base::BEGIN@1
2211µs26µs
# spent 5µs (4+1) within base::BEGIN@2 which was called: # once (4µs+1µs) by base::import at line 2
use strict;
# spent 5µs making 1 call to base::BEGIN@2 # spent 1µs making 1 call to strict::import
3228µs28µs
# spent 5µs (3+2) within base::BEGIN@3 which was called: # once (3µs+2µs) by base::import at line 3
use warnings;
# spent 5µs making 1 call to base::BEGIN@3 # spent 2µs making 1 call to warnings::import
4
5package Log::Any::Adapter::Base;
6
71300nsour $VERSION = '1.032';
8
9# we import these in case any legacy adapter uses them as class methods
10252µs239µs
# spent 22µs (4+18) within Log::Any::Adapter::Base::BEGIN@10 which was called: # once (4µs+18µs) by base::import at line 10
use Log::Any::Adapter::Util qw/make_method dump_one_line/;
# spent 22µs making 1 call to Log::Any::Adapter::Base::BEGIN@10 # spent 18µs making 1 call to Exporter::import
11
12
# spent 18µs (16+2) within Log::Any::Adapter::Base::new which was called 3 times, avg 6µs/call: # 3 times (16µs+2µs) by Log::Any::Manager::_new_adapter_for_entry at line 63 of Log/Any/Manager.pm, avg 6µs/call
sub new {
1331µs my $class = shift;
1432µs my $self = {@_};
1531µs bless $self, $class;
1634µs32µs $self->init(@_);
# spent 2µs making 3 calls to Log::Any::Adapter::Base::init, avg 633ns/call
1735µs return $self;
18}
19
2036µs
# spent 2µs within Log::Any::Adapter::Base::init which was called 3 times, avg 633ns/call: # 3 times (2µs+0s) by Log::Any::Adapter::Base::new at line 16, avg 633ns/call
sub init { }
21
22# Create stub logging methods
2311µs12µsfor my $method ( Log::Any::Adapter::Util::logging_and_detection_methods() ) {
24279µs218µs
# spent 11µs (5+6) within Log::Any::Adapter::Base::BEGIN@24 which was called: # once (5µs+6µs) by base::import at line 24
no strict 'refs';
# spent 11µs making 1 call to Log::Any::Adapter::Base::BEGIN@24 # spent 6µs making 1 call to strict::unimport
25 *$method = sub {
26 my $class = ref( $_[0] ) || $_[0];
27 die "$class does not implement $method";
281827µs };
29}
30
31# This methods installs a method that delegates to an object attribute
32sub delegate_method_to_slot {
33 my ( $class, $slot, $method, $adapter_method ) = @_;
34
35 make_method( $method,
36 sub { my $self = shift; return $self->{$slot}->$adapter_method(@_) },
37 $class );
38}
39
4013µs1;
 
# spent 4µs within base::CORE:match which was called 19 times, avg 237ns/call: # 19 times (4µs+0s) by base::import at line 109 of base.pm, avg 237ns/call
sub base::CORE:match; # opcode
# spent 20µs within base::CORE:subst which was called 19 times, avg 1µs/call: # 19 times (20µs+0s) by base::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/base.pm:72] at line 68 of base.pm, avg 1µs/call
sub base::CORE:subst; # opcode