clock
variable.
For example, to time iterations I
typically do
Enter command: quiet; start := clock; g 100; print start-clock; quiet offwhich will print out the elapsed time in seconds. I do
quiet
here
to suppress output to the screen, which can slow down things considerably.
cpu_counter
variable.
cpu_counter
available and Evolver has been compiled with the manifest
constant PROF_EVALS defined, the expression evaluator
inside Evolver keeps track of the clock cycles elapsed
during each expression evaluation. These expressions
include procedures, functions, constraint and boundary
formulas, content integrands, energy integrands, quantity
integrands, etc; everything that prints out as code in
a dump file. The
print profiling
command will print the
accumulated CPU cycles so far for each type of expression.
The times are inclusive of any child functions or procedures.
An example, from mound.fe after running "gogo":
Enter command: print profiling Inclusive profiling counts: Name CPU Cycles re 1,952,792 gogo 125,201,889 gogo2 0 gogo3 0 gogo4 0 gogo5 0 Constraint expressions Constraint Formula Cycles Energy Cycles Content Cycles 1 877,047 2,337,727 0Note that hard-coded evaluations of area, volume, etc. do not show up here, except for their effect on overall elapsed time.
The command reset_profiling
will set all the cycle values back to 0.