VTS includes a useful analysis utility called the Profiler. The Profiler can be used to analyze bottlenecks in your applications. If a particular statement has a very high execution count, it may signal an "If 1" (continuously executing) condition. Statements of this nature can have a severe impact on the speed and performance of an application. The Profiler can help you recognize such statements and correct any problems.
Note: If the Profiler application is not referenced in the VAM, you must manually add it. The Profiler application's directory is named "Profile", and is stored within the VTS installation directory. If you require assistance in adding the Profiler application to the VAM, please refer to the instructions provided in Add an Existing Script Application to the VAM.
The Profiler analysis tool provides information on active statements in VTS applications. An image of the Profiler appears below.

As you can see in the image above, the Profiler utility is composed of the following elements:
Statement Count Indicates the number of statements that executed during the current profile.
Normal Pending Indicates the number of normal statements that were awaiting execution during the current profile.
High Pending Indicates the number of high priority statements that were awaiting execution during the current profile.
Timers Pending Indicates the number of timers that were pending during the current profile.
Priority Pending Indicates the number of priority statements that were awaiting execution during the current profile.
Start Time Indicates the time (in milliseconds) at which the current profile was started.
Stop Time Indicates the time (in milliseconds) at which the current profile was stopped.
Duration Indicates the duration (in milliseconds) for the current profile.
Note: You must click the Stats button (see below) in order to populate the above counts.
Start Begins profiling active statements.
Stop Stops profiling active statements and populates the list.
Stats Populates the statistics in the upper left corner of the Profiler utility (see Statement Count to Stop Time above).
Save Saves the current profile data to either a text file or a .CSV file, according to the selected radio button (see Save to TXT file and Save to CSV file below). A file dialog will prompt for a name and provide a choice of setting the extension to either ".txt" or ".csv".
Pin The pin button can be selected to always keep the Profile window on top, or can be deselected to allow the Profile window to be minimized.
Use fixed duration (seconds) The Use fixed duration (seconds) checkbox can be selected to enable the associated spinbox, from which the amount of time you wish the profile to run may be selected. The profile will automatically stop after the selected amount of time has elapsed. If the Use fixed duration (seconds) checkbox is not selected, you must use the Stop button to end the currently running profile.
Hide grid while profiling The Hide grid while profiling checkbox can be selected to hide the statement profile list while the current profile is running.
Statement Profile List The statement profile list consists of a series of columns, each of which provides information on the statements that were active during the current profile.
Counts: The number of times each statement executed during the current profile.
Time (ms): The execution time (in milliseconds) for each statement in the current profile.
Pct: The percentage of time that each statement executed during the current profile.
File Name: The full path to and name of the source file containing each statement.
Module Name: The name of the module (within the identified source file) that contains each statement.
State: The state (within the identified module) that contains each statement.
Statement
: The numerical index of the statement within the
identified state.
Note: When counting statements, the Profiler begins at "0", and counts all statements from the top of the state to the bottom. The Profiler then returns to the top of the state and begins counting the statements within the first script, then the statements within the second script, and so forth.
Using the Profiler
When the Profiler utility is first run, the statement profile list will initially be empty. To collect data on active statements, either:
• Click the Start button.
OR
• Select the Use fixed duration (seconds) checkbox.
• Select a number of seconds from the associated spinbox.
• Click the Start button.
As soon as the Start button has been clicked, the Profiler will immediately begin to collect data on active statements. Click the Stop button to stop collecting data on active statements, OR if you selected the Use fixed duration (seconds) checkbox and an amount of time in seconds from the associated spinbox, the Profiler will automatically stop collecting data on active statements when the configured amount of time has elapsed.
Once the Stop button has been clicked or the time has elapsed, the statement profile list will populate with data.