home *** CD-ROM | disk | FTP | other *** search
- 10 REM CONST.BAS generates constant LAN activity, reporting
- 20 REM the variance of the time between transactions.
- 30 REM -------------------------------------------------------------
- 40 GOSUB 220' initialization subroutine
- 50 REM -------------------------------------------------------------
- 60 REM Main loop
- 70 REM TN transaction number
- 80 REM DELT time since previous transaction
- 90 REM SX sum of the times between transactions
- 100 REM SSX sum of the squares of the times between transactions
- 110 REM VAR variance of the time between transactions
- 120 REM -------------------------------------------------------------
- 130 TN=TN+1
- 140 DELT=TIMER-PREV: PREV=TIMER
- 150 SX=DELT+SX: SSX=SSX+DELT^2
- 160 VAR = (TN*SSX-SX^2)/(TN*(TN-1))' computer variance
- 170 PRINT "transaction:"; TN; " mean:"; SX/TN; " variance"; VAR
- 180 PUT #1, 1
- 190 GET #1, 1
- 200 GOTO 130
- 210 REM -------------------------------------------------------------
- 220 REM Initialiation of:
- 230 REM N length of the noise record
- 240 REM D$ server "drive" for scratch file
- 250 REM FLNM$ name of scratch file on server
- 260 REM PREV time of previous transaction
- 270 REM QQ$ pad string to be written to disk
- 280 REM -------------------------------------------------------------
- 290 KEY (1) ON
- 300 ON KEY (1) GOSUB 420' stop execution
- 310 REM initialize file to be read
- 320 INPUT "enter record length: ", N
- 330 INPUT "enter drive identifier, without the colon: ", D$
- 340 PRINT "hit F1 to stop"
- 350 FLNM$ = D$ + ":junk"
- 360 OPEN "r", 1, FLNM$, N
- 370 FIELD #1, N AS Q$
- 380 QQ$=STRING$ (N, "q")
- 390 LSET Q$ = QQ$
- 400 PREV=TIMER' initialize for statistics
- 410 RETURN
- 420 END' operator hits F1 to stop execution