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