src/utils/qa/sessionStats.csh 1.8

1.8 2010/04/01 21:03:38 kuhn
added bar graph for number of sessions
Index: src/utils/qa/sessionStats.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/sessionStats.csh,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -B -U 4 -r1.7 -r1.8
--- src/utils/qa/sessionStats.csh	12 Jan 2010 20:50:33 -0000	1.7
+++ src/utils/qa/sessionStats.csh	1 Apr 2010 21:03:38 -0000	1.8
@@ -33,8 +33,9 @@
 set months=`hgsql -N -h $sqlrr -e "SELECT DISTINCT firstUse FROM namedSessionDb" hgcentral \
   | awk -F- '{print $1"-"$2}' | sort -u`
 
 # get stats
+rm -f tempOutFile
 echo
 echo " first  count users  shared   reused  "
 echo "------  ----- ----- -------  -------"
 foreach month ( $months )
@@ -48,9 +49,10 @@
     WHERE firstUse like "'$month%'"' hgcentral \
     |  awk '$1 != $3 {print $1, $3}'  | wc -l`
   echo $month $count $users $shared $reuse  \
     | awk '{printf ("%7s %4s %5s %4s %2d%% %4s %2d%%\n", \
-    $1, $2, $3, $4, $4/$2*100, $5, $5/$2*100)}'
+    $1, $2, $3, $4, $4/$2*100, $5, $5/$2*100)}' | tee -a tempOutFile
+
   # do totals
   set countTot=`echo $countTot $count | awk '{print $1+$2}'`
   set userTot=`echo $userTot $users | awk '{print $1+$2}'`
   set shareTot=`echo $shareTot $shared | awk '{print $1+$2}'`
@@ -67,8 +69,13 @@
   | awk '{printf ("%7s %4s %5s \n", $1, $2, $3)}'
 
 echo "------  ----- ----- -------  -------"
 echo " first  count users  shared   reused  "
+echo
+
+# graph it
+graph.csh tempOutFile
+rm -f tempOutFile
 
 echo
 # see how often people make more than one session:
 echo "how many people had more than one session?"