How To: Determine the execution time for one or more ArcInfo Workstation commands in an AML


The AML function [show &PT {TIME | CPU | DIO | ALL}] allows you to determine how many seconds one or more sequential Workstation ArcInfo commands take to perform.


Enter two performance timers [show &pt time] function lines into an AML script. The first [show &pt time] function initializes the performance timer. It must precede the line or lines you want to time. The second [show &pt time] returns how many seconds have passed while the commands between the the first and second [show &pt time] line where executed. The second [show &pt time] line must be placed immediately after the last command being evaluated.

If you run this AML, you will see approximately 15 seconds pass on your wrist watch between when the "Waiting:" prompts appear on the screen and the performance time is listed for both AML PAUSE commands.

/* demo_performance_timer.aml
/* The first [show &pt timer] initializes the AML performance timer.
/* The second [show &pt time] returns seconds since the previous [show &pt].
/* Since the two &pause directive pause execution for a total of 15 seconds,
/* the second [show &pt time] returns 15 seconds.
/* You will see the following on the screen when you run this AMl.
/* Arc: &r performance_timer.aml
/* Waiting:
/* Waiting:
/* 15.00
/* Arc:

&sv initialize := [show &pt time]
&pause 'Waiting:' &seconds 5
&pause 'Waiting:' &seconds 10
&type Total time spent pausing was [show &pt time] seconds.