You use the PowerScript functions and PowerBuilder objects listed in Table 33-11 to access the data in the trace file directly so that you can develop your own analysis tools.
Use this function |
With this object |
To do this |
---|---|---|
Open |
TraceFile |
Opens the trace file to be analyzed. |
NextActivity |
TraceFile |
Returns the next activity in the trace file. The value returned is of type TraceActivityNode. |
Reset |
TraceFile |
Resets the next activity to the beginning of the trace file. |
Close |
TraceFile |
Closes the open trace file. |
With the exception of NextActivity, each of these functions returns a value of type ErrorReturn. Each TraceActivityNode object includes information about the category of the activity, the timer value when the activity occurred, and the activity type.
The category of the activity is either TraceIn! or TraceOut! for activities that have separate beginning and ending points, such as routines, garbage collection, and tracing itself. Each such activity has two timer values associated with it: the time when it began and the time when it completed.
Activities that have only one associated timer value are in the category TraceAtomic!. ActLine!, ActUser!, and ActError! are all atomic activities.
The following objects inherit from TraceActivityNode and contain data about the associated activity type:
TraceBeginEnd
TraceError
TraceESQL
TraceGarbageCollect
TraceLine
TraceObject
TraceRoutine
TraceUser
TraceTreeNode and TraceActivityNode objects The objects that inherit from TraceActivityNode are analogous to those that inherit from TraceTreeNode, and you can use similar techniques when you write applications that use them.
For a list of activity types, see “Trace activities”.