home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 March / PCO3_97.ISO / filesbbs / os2 / lzo026.arj / LZO026.ZIP / lzo-0.26 / util / bench.sh next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1996-10-23  |  826 b   |  38 lines

  1. #! /bin/sh
  2.  
  3. #
  4. # This is the 'official' LZO benchmark driver.
  5. #
  6. # usage: util/bench.sh Calgary-Corpus-directory
  7. #
  8. #
  9. # Benchmark cookbook:
  10. # -------------------
  11. # 1) verify that LZO works (see PLATFORM.TXT)
  12. # 2) check that your machine is idle
  13. # 3) run 'sh util/bench.sh Calgary-Corpus-directory > bench.log'
  14. #    note: this *must* take 20 minutes or more !
  15. # 4) run 'perl util/table.pl -b bench.log' to get your benchmark values
  16. #
  17. #
  18. # If the execution time of this script is less than 20 minutes,
  19. # then increase the value of the variable 'n' below.
  20. #
  21. #
  22. # Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  23. #
  24.  
  25.  
  26. # n=8 takes about 21 minutes on my Intel i486 DX2/66 (djgpp v2 + gcc 2.7.2)
  27. n=8
  28.  
  29.  
  30. d=$[ $n*4 ]
  31. dir=${1-"."}
  32.  
  33. ./lzo_test -mbench -b262144 -s1 $dir -c$n -d$d
  34. err=$?; if test $err != 0; then exit $err; fi
  35.  
  36. exit 0
  37.  
  38.