]> git.donarmstrong.com Git - bugscan.git/blob - dograph
add missing } to FilterBugsStable
[bugscan.git] / dograph
1 #! /bin/sh
2
3 set -e
4
5 cd /org/bugs.debian.org/bugscan
6
7 tmp=`tempfile`
8 tmp2=`tempfile`
9 tmp3=`tempfile`
10
11 find counts -type f -not -iname '*.bad'| sort | xargs grep '^' /dev/null |
12     sed 's/^.*count-//;s/ .*$//;s/:/ /' >"$tmp"
13 find counts -type f -not -iname '*.bad'| sort | xargs egrep '^(.* ){6}' /dev/null | tr ":-" " " |
14     cut -d" " -f2,9 >"$tmp2"
15 find counts -type f -not -iname '*.bad'| sort | xargs egrep '^(.* ){7}' /dev/null | tr ":-" " " |
16     cut -d" " -f2,10 >"$tmp3"
17
18 #for i in counts/count-[0-9]* ; do
19 #       date=`echo $i | sed -e s/.*count-//`
20 #       count=`sed -e 's/ .*//' $i`
21 #       echo $date $count >> ${tmp}2
22 #done
23
24 # This is the date of the wheezy release
25 previous_release="201305040600"
26
27 # And this is a month ago
28 previous_month=`date +"%Y%m%d%H%M" --date="1 month ago"`
29
30 cat <<EOF | gnuplot
31 set xdata time
32 set timefmt "%Y%m%d%H%M"
33 set format x "%m\n%Y"
34 set title "Number of release-critical bugs"
35 set nokey
36 set terminal png
37 set yrange [0:]
38 #set xtics 2678400
39 #set nomxtics
40 set linetype  1 lc rgb "dark-violet" lw 1
41 set linetype  2 lc rgb "#009e73" lw 1
42 set linetype  3 lc rgb "#56b4e9" lw 1
43 set linetype  4 lc rgb "#e69f00" lw 1
44 set linetype  5 lc rgb "#f0e442" lw 1
45 set linetype  6 lc rgb "#0072b2" lw 1
46 set linetype  7 lc rgb "#e51e10" lw 1
47 set linetype  8 lc rgb "black"   lw 1
48 set linetype  9 lc rgb "gray50"  lw 1
49 set linetype cycle  9
50 set output "/srv/bugs.debian.org/www/bugscan/graph.png"
51 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
52 set xrange ["$previous_release":]
53 set output "/srv/bugs.debian.org/www/bugscan/graph-release.png"
54 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
55 set xrange ["$previous_month":]
56 set format x "%d\n%m\n%Y"
57 set output "/srv/bugs.debian.org/www/bugscan/graph-month.png"
58 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
59 quit
60 EOF
61
62 rm "$tmp" "$tmp2" "$tmp3"