home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / pcc / v08n03 / netwrk.exe / LANBENCH.ZIP / CONST.BAS next >
BASIC Source File  |  1987-05-05  |  2KB  |  43 lines

  1. 10 REM CONST.BAS generates constant LAN activity, reporting
  2. 20 REM the variance of the time between transactions.
  3. 30 REM  -------------------------------------------------------------
  4. 40 GOSUB 220'  initialization subroutine
  5. 50 REM  -------------------------------------------------------------
  6. 60 REM Main loop
  7. 70 REM    TN       transaction number
  8. 80 REM    DELT     time since previous transaction
  9. 90 REM    SX       sum of the times between transactions
  10. 100 REM   SSX      sum of the squares of the times between transactions
  11. 110 REM   VAR      variance of the time between transactions
  12. 120 REM -------------------------------------------------------------
  13. 130 TN=TN+1
  14. 140 DELT=TIMER-PREV: PREV=TIMER
  15. 150 SX=DELT+SX: SSX=SSX+DELT^2
  16. 160 VAR = (TN*SSX-SX^2)/(TN*(TN-1))'     computer variance
  17. 170 PRINT "transaction:"; TN; " mean:"; SX/TN; " variance"; VAR
  18. 180 PUT #1, 1
  19. 190 GET #1, 1
  20. 200 GOTO 130
  21. 210 REM  -------------------------------------------------------------
  22. 220 REM Initialiation of:
  23. 230 REM    N        length of the noise record
  24. 240 REM    D$       server "drive" for scratch file
  25. 250 REM    FLNM$    name of scratch file on server
  26. 260 REM    PREV     time of previous transaction
  27. 270 REM    QQ$      pad string to be written to disk
  28. 280 REM  -------------------------------------------------------------
  29. 290 KEY (1) ON
  30. 300 ON KEY (1) GOSUB 420'     stop execution
  31. 310 REM initialize file to be read
  32. 320 INPUT "enter record length: ", N
  33. 330 INPUT "enter drive identifier, without the colon: ", D$
  34. 340 PRINT "hit F1 to stop"
  35. 350 FLNM$ = D$ + ":junk"
  36. 360 OPEN "r", 1, FLNM$, N
  37. 370 FIELD #1, N AS Q$
  38. 380 QQ$=STRING$ (N, "q")
  39. 390 LSET Q$ = QQ$
  40. 400 PREV=TIMER'               initialize for statistics
  41. 410 RETURN
  42. 420 END'                      operator hits F1 to stop execution 
  43.