blib/lib/Devel/KYTProf/Profiler/Fluent/Logger.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 96.4% 27 / 28 CC 2 SCAR 2.2
CC
2
Cov
100%
apply
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 package Devel::KYTProf::Profiler::Fluent::Logger;
2 2 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Fluent::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = "0.02";
8  
9 1 ▶sub apply {
Subroutine apply: called CC=2 SCAR=6.9
Pod undocumented
10 Devel::KYTProf->add_prof(
11 'Fluent::Logger',
12 '_post',
13 1 ▶ sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
14 1 my ($orig, $self, $tag, $msg, $time) = @_;
15 return [
16 1 '%s tag:%s size:%s time:%f',
17 ['method', 'tag', 'message_size', 'message_time'],
18 {
19 method => '_post',
20 tag => $tag,
21 message_size => length($msg),
22 message_time => $time,
23 },
24 ];
25 },
26 1 );
27  
28 1 for my $method (qw/ _connect close /) {
29 Devel::KYTProf->add_prof(
30 'Fluent::Logger',
31 $method,
32 3 ▶ sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
33 3 my ($orig, $self) = @_;
34 return [
35 3 '%s host:%s port:%d',
36 ['method', 'host', 'port'],
37 {
38 method => $method,
39 host => $self->host,
40 port => $self->port,
41 },
42 ];
43 },
44 2 );
45 }
46 }
47  
48 2 1;
49 __END__
↑ Summary