home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / byteunix.lzh / byte.1 / cleanup < prev    next >
Text File  |  1990-05-11  |  2KB  |  102 lines

  1. #! /bin/sh
  2. ###############################################################################
  3. #  The BYTE UNIX Benchmarks - Release 2
  4. #          Module: cleanup   SID: 2.3 4/17/90 16:45:39
  5. #          
  6. ###############################################################################
  7. # Bug reports, patches, comments, suggestions should be sent to:
  8. #
  9. #    Ben Smith or Rick Grehan at BYTE Magazine
  10. #    ben@bytepb.UUCP    rick_g@bytepb.UUCP
  11. #
  12. ###############################################################################
  13. #  Modification Log:
  14. #  added report for dhrystones 6/89 - ben
  15. #
  16. ###############################################################################
  17. ID="@(#)cleanup:2.3 -- 4/17/90 16:45:39";
  18. #
  19. # $Header: cleanup,v 5.2 88/01/07 10:58:24 kenj Exp $
  20. #
  21. #  Cleanup when an iterative test terminates
  22. #
  23. BINDIR=${BINDIR-./pgms}
  24. bell=""
  25. log=${LOG-./results/log}
  26. timeaccum=${TIMEACCUM-./results/times}
  27. while ( test $# -ge 1 )
  28. do
  29.     opt=$1
  30.     shift
  31.     case $opt
  32.     in
  33.  
  34.     -a) : abort
  35.     echo '' >>$LOGFILE
  36.     echo '**************************' >>$LOGFILE
  37.     echo '* Benchmark Aborted .... *' >>$LOGFILE
  38.     echo '**************************' >>$LOGFILE
  39.     echo
  40.     echo 'Benchmark Aborted ....'    # notice displayed on screen
  41.     echo "" >>$LOGFILE
  42.     echo " " `who | wc -l` "interactive users." >>$LOGFILE
  43.     echo "" >>$LOGFILE
  44.     date=`date`
  45.     echo "End Benchmark Run ($date) ...." >>$LOGFILE
  46.     echo "End Benchmark Run ($date) ...."
  47.     ;;
  48.  
  49.  
  50.     -f) : filesystem throughput
  51.     awk -f ${BINDIR}/fs.awk <$1 >>$LOGFILE
  52.     cat $1 >> $timeaccum 2>/dev/null
  53.     rm -f $1
  54.     shift
  55.     ;;
  56.     
  57.     -d) : dhrystone evaluation
  58.     awk -f ${BINDIR}/dhry.awk <$1 >>$LOGFILE
  59.     cat $1 >> $timeaccum 2>/dev/null
  60.     rm -f $1
  61.     shift
  62.     ;;
  63.     
  64.     -i) : report last iteration
  65.     echo "Terminated during iteration $1" >>$LOGFILE
  66.     shift
  67.     ;;
  68.  
  69.     -l) : logfile
  70.     LOGFILE=$1
  71.     shift
  72.     ;;
  73.     
  74.     -r) : reason for failure
  75.     echo $1
  76.     echo $1 >>$LOGFILE
  77.     shift
  78.     ;;
  79.  
  80.     -m) : mem throughput tests
  81.     awk -f ${BINDIR}/mem.awk <$1 >>$LOGFILE
  82.     cat $1 >> $timeaccum 2>/dev/null
  83.     rm -f $1
  84.     shift
  85.     ;;
  86.  
  87.     -t) : timing with /bin/time
  88.     awk -f ${BINDIR}/time.awk <$1 >>$LOGFILE
  89.     cat $1 >> $timeaccum 2>/dev/null
  90.     rm -f $1
  91.     shift
  92.     ;;
  93.  
  94.     '') : 'skip it (residual effect of shifts)'
  95.     ;;
  96.  
  97.     *)
  98.     echo "cleanup: bad option ($opt)" >>$LOGFILE
  99. esac
  100. done
  101. exit
  102.