The on option enables profile data collection. If the -commands option is specified, data on all commands within a procedure is collected. Multiple occurrences of a command within a procedure are not distinguished, but this data may still be useful for analysis.
The off option turns off profiling and moves the
data collected to the array arrayVar. The array
is addressed by a list containing the procedure call
stack. Element zero is the top of the stack, the procedure
the data is for. The data in each entry is a list
consisting of the procedure call count and the real time
and CPU time in milliseconds spent in the
procedure (and all procedures it called). The list is in
the form:
{count real cpu}
A Tcl procedure profrep is supplied for reducing the data and producing a report.