home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 02a / pctj486.zip / BENCHMKS.SC < prev    next >
Text File  |  1986-02-14  |  2KB  |  98 lines

  1. ; BENCHMKS.SC
  2. ; PC Tech Journal Data Manager Template Benchmarks -- Main Program
  3. ; Will Fastie -- 12/16/85
  4. ; Edit:  12/20/85 1020
  5.  
  6. clear
  7. clearall
  8. title = format("w80,ac", "PC Tech Journal Data Manager Benchmarks")
  9. @2,0
  10. style reverse
  11. ?? title
  12. style
  13. @4,0
  14. text
  15.  
  16.      This program automatically runs the five benchmarks specified
  17. in the Software Review Specification for Data Management Products.
  18.  
  19.      Start, stop, and elapsed times are given.  Elapsed times can
  20. be up to 24 hours long and are correct across midnight.
  21.  
  22.  
  23. endtext
  24. mar = 5                     ; establish report margin
  25.  
  26.  
  27. showmenu
  28.   "All":           "Run all 5 benchmark programs",
  29.   "NoLoad":        "Do not run import tests; run all others",
  30.   "Special":       "Run a special sequence of the tests",
  31.   "Exit":          "Return to main program"
  32. default "All"
  33. to choice
  34.  
  35.  
  36. ; Invoke benchmarks
  37. @row(),0
  38.   style reverse
  39.   ?? format("w80,ac", "Benchmark Timings for PARADOX on " +
  40.                        strval(today()) +" at " + strval(time()) )
  41.   style
  42. @row()+1, mar
  43.   ?? "Benchmark Name            Start              "
  44.   ?? "Stop               Nr Secs"
  45. @row()+1, mar
  46.   ?? "------------------------  -----------------  "
  47.   ?? "-----------------  -------"
  48.  
  49. switch
  50.  
  51.   case choice = "All":
  52.     play "bench1"
  53.     play "bench2"
  54.     play "bench3"
  55.     play "bench4"
  56.     play "bench5"
  57.  
  58.   case choice = "NoLoad":
  59.     play "bench2"
  60.     play "bench3"
  61.     play "bench4"
  62.     play "bench5"
  63.  
  64.   case choice = "Special":
  65.     r = row()  c = col()
  66.     @0,0 ?? "Enter the sequence (e.g., 455):  "
  67.     accept "a10" to sequence
  68.     @r,c
  69.     while len(sequence) > 0
  70.       seq = substr(sequence, 1, 1)
  71.       if len(sequence) = 1
  72.         then sequence = ""
  73.         else sequence = substr(sequence,2,len(sequence)-1)
  74.       endif
  75.       if seq <> " " and search(seq, "12345") <> 0
  76.         then EXECUTE "play \"bench" + seq + "\""
  77.       endif
  78.     endwhile
  79.  
  80.   case choice = "Exit":        return
  81.   otherwise:                   return
  82. endswitch
  83.  
  84.  
  85. ; Wait for results to be recorded on paper
  86. @24,0
  87. style reverse
  88. ?? format("w77,ar","Press Shift-PrtSc to print, other to exit")
  89. style reverse, blink
  90. ?? "..."
  91. style
  92. x = getchar()   ;wait for a keypress
  93. clearall
  94. return
  95.  
  96.  
  97. ; end BENCHMKS.SC
  98.