← 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:09 2016

Filename/opt/flows/lib/lib/perl5/Log/Any/Adapter/Base.pm
StatementsExecuted 43 statements in 491µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
21119µs22µsLog::Any::Adapter::Base::::newLog::Any::Adapter::Base::new
11118µs18µsLog::Any::Adapter::Null::::BEGIN@1Log::Any::Adapter::Null::BEGIN@1
11110µs48µsLog::Any::Adapter::Base::::BEGIN@10Log::Any::Adapter::Base::BEGIN@10
1119µs14µsLog::Any::Adapter::Null::::BEGIN@3Log::Any::Adapter::Null::BEGIN@3
1119µs20µsLog::Any::Adapter::Base::::BEGIN@24Log::Any::Adapter::Base::BEGIN@24
1118µs25µsLog::Any::Adapter::Null::::BEGIN@2Log::Any::Adapter::Null::BEGIN@2
2112µ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
1260µs118µs
# spent 18µs within Log::Any::Adapter::Null::BEGIN@1 which was called: # once (18µs+0s) by Log::Any::Adapter::Null::BEGIN@10 at line 1
use 5.008001;
# spent 18µs making 1 call to Log::Any::Adapter::Null::BEGIN@1
2227µs242µs
# spent 25µs (8+17) within Log::Any::Adapter::Null::BEGIN@2 which was called: # once (8µs+17µs) by Log::Any::Adapter::Null::BEGIN@10 at line 2
use strict;
# spent 25µs making 1 call to Log::Any::Adapter::Null::BEGIN@2 # spent 17µs making 1 call to strict::import
3254µs218µs
# spent 14µs (9+5) within Log::Any::Adapter::Null::BEGIN@3 which was called: # once (9µs+5µs) by Log::Any::Adapter::Null::BEGIN@10 at line 3
use warnings;
# spent 14µs making 1 call to Log::Any::Adapter::Null::BEGIN@3 # spent 5µs making 1 call to warnings::import
4
5package Log::Any::Adapter::Base;
6
71700nsour $VERSION = '1.040';
8
9# we import these in case any legacy adapter uses them as class methods
102108µs285µs
# spent 48µs (10+38) within Log::Any::Adapter::Base::BEGIN@10 which was called: # once (10µs+38µs) by Log::Any::Adapter::Null::BEGIN@10 at line 10
use Log::Any::Adapter::Util qw/make_method dump_one_line/;
# spent 48µs making 1 call to Log::Any::Adapter::Base::BEGIN@10 # spent 38µs making 1 call to Exporter::import
11
12
# spent 22µs (19+2) within Log::Any::Adapter::Base::new which was called 2 times, avg 11µs/call: # 2 times (19µs+2µs) by Log::Any::Manager::_new_adapter_for_entry at line 63 of /opt/flows/lib/lib/perl5/Log/Any/Manager.pm, avg 11µs/call
sub new {
1321µs my $class = shift;
1423µs my $self = {@_};
1522µs bless $self, $class;
1625µs22µs $self->init(@_);
# spent 2µs making 2 calls to Log::Any::Adapter::Base::init, avg 1µs/call
1726µs return $self;
18}
19
2027µs
# spent 2µs within Log::Any::Adapter::Base::init which was called 2 times, avg 1µs/call: # 2 times (2µs+0s) by Log::Any::Adapter::Base::new at line 16, avg 1µs/call
sub init { }
21
22# Create stub logging methods
2313µs14µsfor my $method ( Log::Any::Adapter::Util::logging_and_detection_methods() ) {
242159µs232µs
# spent 20µs (9+12) within Log::Any::Adapter::Base::BEGIN@24 which was called: # once (9µs+12µs) by Log::Any::Adapter::Null::BEGIN@10 at line 24
no strict 'refs';
# spent 20µs making 1 call to Log::Any::Adapter::Base::BEGIN@24 # spent 12µs making 1 call to strict::unimport
25 *$method = sub {
26 my $class = ref( $_[0] ) || $_[0];
27 die "$class does not implement $method";
281850µ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
4014µs1;