]> git.donarmstrong.com Git - bugscan.git/blobdiff - dograph
bugscan now uses basename
[bugscan.git] / dograph
diff --git a/dograph b/dograph
index 00be2d3b33d74f90c8fcc54f94ce4bc48b6d1a3b..ba6b822ea793fa6ba1cb7ad36d30db28bfaf5e54 100755 (executable)
--- a/dograph
+++ b/dograph
@@ -8,11 +8,11 @@ tmp=`tempfile`
 tmp2=`tempfile`
 tmp3=`tempfile`
 
-find counts -type f | sort | xargs grep '^' /dev/null |
+find counts -type f -not -iname '*.bad'| sort | xargs grep '^' /dev/null |
     sed 's/^.*count-//;s/ .*$//;s/:/ /' >"$tmp"
-find counts -type f | sort | xargs egrep '^(.* ){6}' /dev/null | tr ":-" " " |
+find counts -type f -not -iname '*.bad'| sort | xargs egrep '^(.* ){6}' /dev/null | tr ":-" " " |
     cut -d" " -f2,9 >"$tmp2"
-find counts -type f | sort | xargs egrep '^(.* ){7}' /dev/null | tr ":-" " " |
+find counts -type f -not -iname '*.bad'| sort | xargs egrep '^(.* ){7}' /dev/null | tr ":-" " " |
     cut -d" " -f2,10 >"$tmp3"
 
 #for i in counts/count-[0-9]* ; do
@@ -21,6 +21,12 @@ find counts -type f | sort | xargs egrep '^(.* ){7}' /dev/null | tr ":-" " " |
 #      echo $date $count >> ${tmp}2
 #done
 
+# This is the date of the wheezy release
+previous_release="201305040600"
+
+# And this is a month ago
+previous_month=`date +"%Y%m%d%H%M" --date="1 month ago"`
+
 cat <<EOF | gnuplot
 set xdata time
 set timefmt "%Y%m%d%H%M"
@@ -33,6 +39,13 @@ set yrange [0:]
 #set nomxtics
 set output "/org/bugs.debian.org/www/bugscan/graph.png"
 plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
+set xrange ["$previous_release":]
+set output "/org/bugs.debian.org/www/bugscan/graph-release.png"
+plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
+set xrange ["$previous_month":]
+set format x "%d\n%m\n%Y"
+set output "/org/bugs.debian.org/www/bugscan/graph-month.png"
+plot "$tmp" using 1:2 with lines, "$tmp2" using 1:2 with lines, "$tmp3" using 1:2 with lines
 quit
 EOF