]> git.donarmstrong.com Git - bugscan.git/blob - dograph
ba6b822ea793fa6ba1cb7ad36d30db28bfaf5e54
[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 output "/org/bugs.debian.org/www/bugscan/graph.png"
41 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
42 set xrange ["$previous_release":]
43 set output "/org/bugs.debian.org/www/bugscan/graph-release.png"
44 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
45 set xrange ["$previous_month":]
46 set format x "%d\n%m\n%Y"
47 set output "/org/bugs.debian.org/www/bugscan/graph-month.png"
48 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
49 quit
50 EOF
51
52 rm "$tmp" "$tmp2" "$tmp3"