Dec 282017
 
Measure Elapsed Time for program runs, v1.3.
File 130.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Measure Elapsed Time for program runs, v1.3.
File Name File Size Zip Size Zip Type
!VERSION.130 1 1 stored
ET.COM 1731 1081 deflated
ET.DOC 3237 1409 deflated
ET.HST 444 244 deflated

Download File 130.ZIP Here

Contents of the ET.DOC file



ET.DOC

ET.COM is an elapsed timer function for measuring program
performance. ET is invoked from the command line with the test
file and its arguments being passed as command line parameters.


The COMPLETE path, file name, and extension of the program
being timed must be specified. The EXEC loader appears to ignore
the environment string being passed to it. This results in a
'File not found' message if the test file is not in the current
directory.


The tested program runs as a child process of ET using the DOS
EXEC function call. Except for the PATH problem, the child process
loads and executes normally, and then exits back to ET. Elapsed
time includes the load process in addition to the actual execution
time. The most realistic results are obtained by testing the
program from a RAM disk. Loader times are typically in the
hundredths of a second in a Ram disk.


Usage instructions can be found by entering ET
on the command line. Version and release date is located
by 'TYPEing' ET.COM from the DOS prompt.



A functional example would be testing Phil Katz' PKARC
execution time in comparison to SEA's ARC:

e.g. ET C:PKARC.COM a TEST.ARC TestFile.Ext






CAVEATS:

*** ET will not perform under DEBUG without modification ***
The SETBLOCK function crashes under my DEBUG287.COM
(v2.10) debugger.

Use DEBUG to search ET.COM for text instructions at
the Main_Line. There is room there to hack the BX
setup to Mov BX,1000h. This will allow Debug testing.


I/O redirection appears to function normally, and was tested
with DEBUG.COM DUMP.TXT.

Version 1.30 has increased testing for valid file types, and
will no longer allow anything other that .COM or .EXE to be passed
as a test file name. A user attempted to time a batch file,
and went off to Lockup Land.




For the curious, the operation is as follows:

1) ET loads and issues a 4Ah (SETBLOCK) call to reduce memory
2) The command tail is parsed for the test file and its parameters
3) The test file existence is verified before the EXEC is issued
4) A Program Segment Prefix table is built with the command line parms
5) The system timer is stored just prior to the EXEC call
6) The child program is invoked and executed
7) The child process exit AL reg is saved as a return code for ET
8) The system timer is stored again
9) Elapsed time is calculated from the two stored timer values
10) ET exits by function call 4Ch with the child program's return code


As usual, bug reports, suggestions, and (of course) money
are all graciously accepted.

Best regards,


Bruce Gavin
4730 Signal Rock Rd
Colorado Springs CO 80922
CIS: 70137,3244


 December 28, 2017  Add comments

Leave a Reply