line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
1741
|
no strict; # TODO fix this |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
2
|
1
|
|
|
1
|
|
26
|
use GD::Graph::bars; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use GD::Graph::hbars; |
4
|
|
|
|
|
|
|
require 'save.pl'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# CONTRIB Edwin Hildebrand. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# See changes in bars.pm: Check for bar height rounding errors when |
9
|
|
|
|
|
|
|
# stacking bars. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
@dat = qw( |
12
|
|
|
|
|
|
|
991006 991007 991114 991117 991118 991119 991120 |
13
|
|
|
|
|
|
|
991121 991122 991123 991124 991125 991126 991127 |
14
|
|
|
|
|
|
|
991128 991129 991130 991201 991204 991205 991206 |
15
|
|
|
|
|
|
|
991207 991208 |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
@sub = qw(0 0 0 0 0 0 0 0 1 1 1 1 2 3 1 1 1 1 2 2 6 8 8); |
19
|
|
|
|
|
|
|
@def = qw(0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0); |
20
|
|
|
|
|
|
|
@rej = qw(0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0); |
21
|
|
|
|
|
|
|
@opn = qw(4 4 4 5 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3); |
22
|
|
|
|
|
|
|
@ass = qw(0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0); |
23
|
|
|
|
|
|
|
@wrk = qw(1 2 2 2 2 2 1 1 2 2 2 1 1 1 1 1 1 1 1 1 3 6 5); |
24
|
|
|
|
|
|
|
@fin = qw(0 0 0 0 0 0 1 0 0 0 0 1 1 1 2 2 2 2 2 2 2 2 2); |
25
|
|
|
|
|
|
|
@ver = qw(0 0 0 0 0 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1); |
26
|
|
|
|
|
|
|
@con = qw(0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0); |
27
|
|
|
|
|
|
|
@tst = qw(0 0 0 0 0 0 0 0 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1); |
28
|
|
|
|
|
|
|
@rev = qw(0 0 0 0 0 0 0 0 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1); |
29
|
|
|
|
|
|
|
@cco = qw(0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0); |
30
|
|
|
|
|
|
|
@cls = qw(0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0); |
31
|
|
|
|
|
|
|
@sld = qw(0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 3 3 3 4); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# setup x data |
34
|
|
|
|
|
|
|
push(@data,\@dat); # push x labels into plot data |
35
|
|
|
|
|
|
|
push(@data,\@sub); |
36
|
|
|
|
|
|
|
push(@data,\@def); |
37
|
|
|
|
|
|
|
push(@data,\@rej); |
38
|
|
|
|
|
|
|
push(@data,\@opn); |
39
|
|
|
|
|
|
|
push(@data,\@ass); # push x values into plot data |
40
|
|
|
|
|
|
|
push(@data,\@wrk); # (push order must match legend label order) |
41
|
|
|
|
|
|
|
push(@data,\@fin); |
42
|
|
|
|
|
|
|
push(@data,\@ver); |
43
|
|
|
|
|
|
|
push(@data,\@con); |
44
|
|
|
|
|
|
|
push(@data,\@tst); |
45
|
|
|
|
|
|
|
push(@data,\@rev); |
46
|
|
|
|
|
|
|
push(@data,\@cco); |
47
|
|
|
|
|
|
|
push(@data,\@cls); |
48
|
|
|
|
|
|
|
push(@data,\@sld); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# setup legend labels |
51
|
|
|
|
|
|
|
@legend = qw( |
52
|
|
|
|
|
|
|
Submitted Deferred Rejected Opened Assigned Work |
53
|
|
|
|
|
|
|
Finished Verified Configured Tested Reviewed |
54
|
|
|
|
|
|
|
Closed-CO Closed Sealed |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my @names = qw/sample18 sample18-h/; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
for my $graph (GD::Graph::bars->new(600, 400), |
60
|
|
|
|
|
|
|
GD::Graph::hbars->new(600, 400)) |
61
|
|
|
|
|
|
|
{ |
62
|
|
|
|
|
|
|
my $name = shift @names; |
63
|
|
|
|
|
|
|
print STDERR "Processing $name\n"; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# set graph legend |
66
|
|
|
|
|
|
|
$graph->set_legend(@legend); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# set graph options |
69
|
|
|
|
|
|
|
$graph->set( |
70
|
|
|
|
|
|
|
'dclrs' => [ qw(lblue lyellow blue yellow lgreen lred |
71
|
|
|
|
|
|
|
green red purple orange pink dyellow) ], |
72
|
|
|
|
|
|
|
'title' => "States by Time", |
73
|
|
|
|
|
|
|
'x_label' => "Time", |
74
|
|
|
|
|
|
|
'y_label' => "# OF thingies", |
75
|
|
|
|
|
|
|
'long_ticks' => 1, |
76
|
|
|
|
|
|
|
'tick_length' => 0, |
77
|
|
|
|
|
|
|
'x_ticks' => 0, |
78
|
|
|
|
|
|
|
'x_label_position' => .5, |
79
|
|
|
|
|
|
|
'y_label_position' => .5, |
80
|
|
|
|
|
|
|
'cumulate' => 1, |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
'bgclr' => 'white', |
83
|
|
|
|
|
|
|
'transparent' => 0, |
84
|
|
|
|
|
|
|
'interlaced' => 1, |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
'y_tick_number' => 5, |
87
|
|
|
|
|
|
|
'y_number_format' => '%d', |
88
|
|
|
|
|
|
|
#'y_max_value' => 25, |
89
|
|
|
|
|
|
|
#'y_min_value' => 0, |
90
|
|
|
|
|
|
|
'y_plot_values' => 1, |
91
|
|
|
|
|
|
|
'x_plot_values' => 1, |
92
|
|
|
|
|
|
|
'zero_axis' => 1, |
93
|
|
|
|
|
|
|
); |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
$graph->set('x_labels_vertical'=> 1) unless $name =~/-h$/; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
$graph->plot(\@data); |
98
|
|
|
|
|
|
|
save_chart($graph, $name); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
1; |