~inspirated/arsenal/send-attachments-lpltk

« back to all changes in this revision

Viewing changes to hooks/graph-proprietary

  • Committer: Bryce Harrington
  • Date: 2009-04-14 07:20:37 UTC
  • Revision ID: bryce@canonical.com-20090414072037-8tyqpo3elyy0xl7i
Adding new hook scripts (migrating a few from contrib...) and moving
dependencies into scripts dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
if [ -f /etc/arsenal/arsenal.conf ] ; then
 
4
    . /etc/arsenal/arsenal.conf
 
5
fi
 
6
if [ -f /etc/arsenal/site.conf ] ; then
 
7
    . /etc/arsenal/site.conf
 
8
fi
 
9
 
 
10
quarter="2009-Q2"
 
11
 
 
12
./bugtotals --proprietary -d -q $quarter > bugtotals-proprietary-${quarter}.dat 
 
13
 
 
14
if [ $? != 0 ] ; then
 
15
    echo "Error getting bug totals data"
 
16
    exit 1
 
17
fi
 
18
 
 
19
for i in $(seq 2 31); do
 
20
    ls=$(( $i - 1 ))
 
21
    data="$data \"bugtotals-proprietary-${quarter}.dat\" using 1:$i title $i with filledcurves ls $ls, "
 
22
done
 
23
data="$data \"bugtotals-proprietary-${quarter}.dat\" using 1:32 title 32 with filledcurves ls 32"
 
24
 
 
25
gnuplot << EOF
 
26
set title "Ubuntu Xorg Bug Reports - Proprietary Setoff ($quarter)"
 
27
 
 
28
set term svg size 1024 800
 
29
set style fill solid
 
30
set palette maxcolors 256
 
31
set style line 30 lt rgb "#eec73e"
 
32
set style line 29 lt rgb "#f0a513"
 
33
set style line 33 lt rgb "#fb8b00"
 
34
set style line 31 lt rgb "#f44800"
 
35
 
 
36
set style line 21 lt rgb "#fdff99"
 
37
set style line 32 lt rgb "#ffff00"
 
38
set style line 24 lt rgb "#fdca01"
 
39
set style line 22 lt rgb "#986601"
 
40
 
 
41
set style line 25 lt rgb "#f44800"
 
42
set style line 28 lt rgb "#fd3301"
 
43
set style line 27 lt rgb "#d40000"
 
44
set style line 26 lt rgb "#980101"
 
45
 
 
46
set style line 13 lt rgb "#816647"
 
47
set style line 16 lt rgb "#565248"
 
48
set style line 15 lt rgb "#fdd99b"
 
49
set style line 14 lt rgb "#d9bb7a"
 
50
 
 
51
set style line  1 lt rgb "#aaccee"
 
52
set style line  4 lt rgb "#6699cc"
 
53
set style line  3 lt rgb "#336699"
 
54
set style line  2 lt rgb "#003366"
 
55
 
 
56
set style line 17 lt rgb "#b3defd"
 
57
set style line 20 lt rgb "#0197fd"
 
58
set style line 19 lt rgb "#0169c9"
 
59
set style line 18 lt rgb "#013397"
 
60
 
 
61
set style line  9 lt rgb "#ccff99"
 
62
set style line 12 lt rgb "#98fc66"
 
63
set style line 11 lt rgb "#339900"
 
64
set style line 10 lt rgb "#015a01"
 
65
 
 
66
set style line  5 lt rgb "#ff00ff"
 
67
set style line  8 lt rgb "#6600cc"
 
68
set style line  7 lt rgb "#002b3d"
 
69
set style line  6 lt rgb "#ff9bff"
 
70
 
 
71
set style line 23 lt rgb "#000000"
 
72
 
 
73
set xdata time
 
74
set timefmt "%y%m%d"
 
75
set autoscale
 
76
set offsets 1, 1, 0, 0
 
77
set xrange ["090401":"090631"]
 
78
set yrange [0:2500]
 
79
set grid xtics mxtics ytics mytics lw 0.1
 
80
set xtics out border nomirror
 
81
set ytics in border mirror
 
82
set format x "%m/%d"
 
83
set mxtics 
 
84
set mytics 
 
85
 
 
86
set output "totals-proprietary-${quarter}.svg"
 
87
set xlabel "Date"
 
88
set ylabel "Total Reports"
 
89
set key vertical outside
 
90
plot $data
 
91
EOF
 
92
 
 
93
firefox totals-proprietary-${quarter}.svg
 
94