File Coverage

blib/lib/PerlGuard/Agent/Output/StandardError.pm
Criterion Covered Total %
statement 6 14 42.8
branch 0 2 0.0
condition n/a
subroutine 2 4 50.0
pod 0 2 0.0
total 8 22 36.3


line stmt bran cond sub pod time code
1             # Output method purely for testing some concepts on the agent before implementing the server
2              
3             package PerlGuard::Agent::Output::StandardError;
4 1     1   2633 use Moo;
  1         2  
  1         8  
5             extends 'PerlGuard::Agent::Output';
6              
7             # Takes a profile object and saves it
8             sub save {
9 0     0 0   my $self = shift;
10 0           my $profile = shift;
11              
12 0 0         return unless $profile->should_save();
13              
14 1     1   5016 use Data::Dumper;
  1         14050  
  1         188  
15              
16 0           print STDERR "======\n";
17 0           print STDERR "Profiler ID " . $profile->uuid() . "\n";
18 0           print STDERR "Total elapsed time " . $profile->total_elapsed_time() . "\n";
19 0           print STDERR Dumper $profile->database_transactions();
20 0           print STDERR "======\n";
21             }
22              
23       0 0   sub flush {
24             #noop
25             }
26              
27              
28             1;