Tcl Powered!NeoWebScript

Home
 
Download
User Info
New User FAQ
Tutorials
Demos
Commands
Variables
Troubleshooting
Sysop Info
Sysop FAQ
Theory
Installation
Management
Tests
Troubleshooting
Feedback
Resources
Release Notes
Credits
Disclaimer
PROFILE - Extended TCL
Synopsis * Description

Collects information on the performance of a Tcl script.

Synopsis

  • profile ?-commands? On
  • profile off arrayVar

Description

This command is used to collect a performance pro- file of a Tcl script. It collects data at the Tcl procedure level. The number of calls to a proce- dure, and the amount of real and CPU time is col- lected. Time is also collected for the global con- text. The procedure data is collected by bucketing it based on the procedure call stack, this allows determination of how much time is spent in a par- ticular procedure in each of it´s calling contexts.

The on option enables profile data collection. If the -commands option is specifed, data on all com- mands within a procedure is collected as well a procedures. 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 address by a list containing the procedure call stack. Element zero is the top of the stack, the procedure that 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 millisec- onds 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

Copyright © 1995-1999 NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA. All Rights Reserved