Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/util/pretim.hlp
There is 1 other file named pretim.hlp in the archive. Click here to see a list.
PRETIM

PRETIM helps to measure execution times for (simple) SIMULA
statements. The execution times on systems with monitor <= 602
will vary quite heavily due to system overhead.

PRETIM is a pre-processor which will produce a
timing SIMULA program and automatically run it.

PRETIM requires the following information:

1. File name of timing program to be produced.

2. Complete external declarations necessary. Note that
   the following declarations are already present:

    EXTERNAL REAL PROCEDURE cptime;
    EXTERNAL PROCEDURE sigmean,scramble,exit;
    EXTERNAL TEXT PROCEDURE inline;

3. Number of test cases.

4. Prefix - enter "SIMSET", "SIMULATION" or other
   appropriate prefix. If none, just press Return.

5. Declaration of variables in test cases.
   E.g. "TEXT t;   CHARACTER c;"
   (Do not use names ending with underline.)

6. Intialization of variables (made once only).

7. Initialization in front of each test loop.

8. Code for each test case - e.g.
   "   t.Setpos(3);  c:= t.Getchar  "

9. Titles (max 6 chars) for each case.


The produced program requires the following information:

Tnorm - i.e. how long time each loop (one the different test
	cases resp.) should take. Should not be < 0.1 sec.
	If the test cases are very time consuming - increase
	Tnorm so that the loop will be executed at least 5
	times (see below). For fast test try 0.1 sec.
	The test program will continually adjust the length
	of the loops in order the conform to Tnorm.

Min. length of loop - i.e. the minimum number each case will
	be executed in ONE loop (the loops are started
	several times in a random order). Try value 10 first time.

Min no. of tests per case - i.e. minimum number of times
	each loop should be started. Try value 4 first time.

Limit	- i.e. maximum time allowed in Cpu seconds. Try 10 sec first.

If the testing program finds out that the time limit set is
too small in relation to the other numbers described above,
then the user will be duly informed.

The execution will continue until one of the following conditions
are fullfilled :

1. Time limit exceeded.

2. Difference between means for best and nest best case
   is less than three times estimate of stand.dev.

Finally a table is presented where displayed timing data are
corrected for the 0-loop. (Note that no correction is
made for loop-initialization, so "Runs" should not be
too small. If the "Runs" values are of too different magnitude -
try duplicating the appropriate test statement WITHIN the loop.

After termination the user may continue the testing by typing
.CONTINUE
If criterium 2 above holds - then just one more loop for each
test case will be executed. If the time limit was exceeded
(criterium 1) then maximum another "LIMIT" seconds will be used.

In order to change parameters, restart by typing .START

When ready - delete generated .TMP files.

A PRETIM session will look like the following:

------------------------------------------------------------
.ru pretim

Test Program name /020TIM.TMP/:
No. of cases:2
Ext.Decl:
Prefix:
Decl:text t;
Decl:
Init0:t:- Blanks(1);
Init0:
Init1:
Case 1
*if t = notext then ;
*
Case 2
*if t == notext then ;
*
Enter titles for tests (max 6 chars.)
Case  1:= NT
Case  2:== NT
Executing 020TIM.TMP: SIMULA:  020TIM
LINK:	Loading
[LNKXCT 020TIM Execution]
Time norm.:0.1
Min length of loop:10
Min no. of test per case:10
Limit:10
Est. time requirement:    4 Sec
Results - in milliseconds

Name  Case  Tests  Runs    R*M    Sigma    Mean     Max      Min        [%]
= NT    1    10    1668     91    0.002    0.055    0.062    0.049     920.6
== NT   2    10    6578     39    0.000    0.006    0.008    0.004     100.0 *
T(alfa): 29.65  Degr. of freedom:   20   Cpu used:  4.1

.con

Results - in milliseconds

Name  Case  Tests  Runs    R*M    Sigma    Mean     Max      Min        [%]
= NT    1    11    1731     94    0.002    0.054    0.062    0.046     919.7
== NT   2    11    6788     40    0.000    0.006    0.008    0.004     100.0 *
T(alfa): 29.08  Degr. of freedom:   22   Cpu used:  4.5

; The T(alfa) value and degr. of freedom may be used to
; find the significance of the test (Student's T-test).
; The values are derived from the two "best" cases.

.del 0??TIM.*
Files deleted:
020TIM.TMP 
020TIM.REL
41 Blocks freed
------------------------------------------------------------

Author: Mats Ohlin, FOA 1, Fack, S-104 50 STOCKHOLM SWEDEN

	[END of PRETIM.HLP 77-03-17]