line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Declare our package |
2
|
|
|
|
|
|
|
package POE::Devel::Profiler::Visualizer::BasicSummary; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# Standard stuff to catch errors |
5
|
1
|
|
|
1
|
|
1235
|
use strict qw(subs vars refs); # Make sure we can't mess up |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
42
|
|
6
|
1
|
|
|
1
|
|
6
|
use warnings FATAL => 'all'; # Enable warnings to catch errors |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
658
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Initialize our version |
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Okay, we need to receive the arguments |
12
|
|
|
|
|
|
|
sub GET_ARGS { |
13
|
|
|
|
|
|
|
# We don't care! |
14
|
0
|
|
|
0
|
0
|
|
return 1; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# The actual work is here |
18
|
|
|
|
|
|
|
sub OUTPUT { |
19
|
|
|
|
|
|
|
# Get the data structure |
20
|
0
|
|
|
0
|
0
|
|
my( undef, $data ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Print the first line |
23
|
0
|
|
|
|
|
|
print "Visualizer::BasicSummary ( " . $data->{'PROGNAME'} . " started at " . scalar gmtime( $data->{'TIME'}->{'START'} ) . " )\n"; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Print the number of sessions |
26
|
0
|
|
|
|
|
|
print "Total number of sessions: " . ( keys %{ $data->{'SESSION'} } ) . "\n"; |
|
0
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# Print the total number of events |
29
|
0
|
|
|
|
|
|
my $events = 0; |
30
|
0
|
|
|
|
|
|
foreach my $sess ( keys %{ $data->{'SESSION'} } ) { |
|
0
|
|
|
|
|
|
|
31
|
0
|
0
|
|
|
|
|
if ( exists $data->{'SESSION'}->{ $sess }->{'HITS'} ) { |
32
|
0
|
|
|
|
|
|
$events += $data->{'SESSION'}->{ $sess }->{'HITS'}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
0
|
|
|
|
|
|
print "Total number of events profiled: $events\n"; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Print the total number of alarms |
38
|
0
|
|
|
|
|
|
my $alarms = 0; |
39
|
0
|
|
|
|
|
|
foreach my $sess ( keys %{ $data->{'SESSION'} } ) { |
|
0
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if ( exists $data->{'SESSION'}->{ $sess }->{'ALARMS'} ) { |
41
|
0
|
|
|
|
|
|
$alarms += scalar( @{ $data->{'SESSION'}->{ $sess }->{'ALARMS'} } ); |
|
0
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
0
|
|
|
|
|
|
print "Total number of alarms profiled: $alarms\n"; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Print the total number of delays |
47
|
0
|
|
|
|
|
|
my $delays = 0; |
48
|
0
|
|
|
|
|
|
foreach my $sess ( keys %{ $data->{'SESSION'} } ) { |
|
0
|
|
|
|
|
|
|
49
|
0
|
0
|
|
|
|
|
if ( exists $data->{'SESSION'}->{ $sess }->{'DELAYS'} ) { |
50
|
0
|
|
|
|
|
|
$delays += scalar( @{ $data->{'SESSION'}->{ $sess }->{'DELAYS'} } ); |
|
0
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
0
|
|
|
|
|
|
print "Total number of delays profiled: $delays\n"; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# Print the total number of signals |
56
|
0
|
|
|
|
|
|
my $signals = 0; |
57
|
0
|
|
|
|
|
|
foreach my $sess ( keys %{ $data->{'SESSION'} } ) { |
|
0
|
|
|
|
|
|
|
58
|
0
|
0
|
|
|
|
|
if ( exists $data->{'SESSION'}->{ $sess }->{'SIGNALS'} ) { |
59
|
0
|
|
|
|
|
|
$signals += scalar( @{ $data->{'SESSION'}->{ $sess }->{'SIGNALS'} } ); |
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
} |
62
|
0
|
|
|
|
|
|
print "Total number of signals profiled: $signals\n"; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Print the number of GC passes |
65
|
0
|
|
|
|
|
|
my $gc = 0; |
66
|
0
|
|
|
|
|
|
foreach my $sess ( keys %{ $data->{'SESSION'} } ) { |
|
0
|
|
|
|
|
|
|
67
|
0
|
0
|
|
|
|
|
if ( exists $data->{'SESSION'}->{ $sess }->{'GC'} ) { |
68
|
0
|
|
|
|
|
|
$gc += scalar( @{ $data->{'SESSION'}->{ $sess }->{'GC'} } ); |
|
0
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
} |
71
|
0
|
|
|
|
|
|
print "Total number of GC passes: $gc\n"; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# Print the footer |
74
|
0
|
|
|
|
|
|
print "Runtime: " . $data->{'TIME'}->{'WALL'} . " wallclock seconds\n"; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# End of module |
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
__END__ |