Appendix A. Rexx Program to Measure Editor Load Times
/***************************************************************************/
/* */
/* Test the execution time of three editors. We need the following files */
/* in the current directory: */
/* */
/* T1, T2, T3 - Sample data files */
/* E.EXE - EOS2 editor */
/* E.EX - EOS2 default profile */
/* T2.EXE - T editor, OS/2 version */
/* X.EXE - X2 Editor */
/* */
/* Written by B. Thompson, December 31, 1993 */
/* */
/***************************************************************************/
Say 'You will have to press F3 27 times quickly for this test...'
Parse Pull .
Call check_editor 'T1' /* Small file*/
Call check_editor 'T2' /* Medium file*/
Call check_editor 'T3' /* Large file*/
Call lineout 'TESTTIME.OUT' /* Close output file*/
Say 'Results are in TESTTIME.OUT'
Exit
/***************************************************************************/
/* */
/* Check each editor against a supplied filename. We do three iterations */
/* for each editor, and average the results. */
/* */
/***************************************************************************/
CHECK_EDITOR: Procedure
Parse Arg fn .
Call lineout 'TESTTIME.OUT', 'Testing against' fn
total. = 0 /* Initialise totals*/
Do iteration = 1 To 3
total._e = total._e + timeit('E' fn)
total._t = total._t + timeit('T2' fn)
total._x = total._x + timeit('X' fn)
End /* End do*/
Call lineout 'TESTTIME.OUT', ' Average time for E was' ,
Format(total._e / 3,2,2) 'seconds'
Call lineout 'TESTTIME.OUT', ' Average time for T was' ,
Format(total._t / 3,2,2) 'seconds'
Call lineout 'TESTTIME.OUT', ' Average time for X2 was' ,
Format(total._x / 3,2,2) 'seconds'
Return
/***************************************************************************/
/* */
/* Invoke the editor and time the execution. The user will have to queue */
/* some F3 keystrokes to make sure we quit as soon as the file is loaded */
/* in each editor. */
/* */
/***************************************************************************/
TIMEIT: Procedure
Parse Arg editor fn .
Call Time('R') /* Start a timer*/
editor fn
Return Time('E')