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
|
|
2546
|
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
|
|
1336
|
use Data::Dumper; |
|
1
|
|
|
|
|
7615
|
|
|
1
|
|
|
|
|
170
|
|
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; |