Profiling Class View
The Class view uses a TreeView control to display statistics
for PowerBuilder objects, their functions, and their events. It
displays statistics only for those objects that were active while
tracing was enabled. The Class view has three tabs:
-
Numbers
Shows statistics only
-
Graph
Shows statistics in a bar graph
-
Source
Shows statistics and source code for those routines that originated
in PowerScript source
For each object, the Class view shows all the routines called
from each class with the number of times each routine was called
(hit) as well as timing information for each call. The following
illustration shows part of a Class view. Embedded SQL commands are shown as being called
from a pseudo class called ESQL.

The Class view includes both PowerBuilder system-level objects
(such as DataWindow and SystemFunction) and user-defined classes
(such as windows and user objects). Each top-level node is a PowerBuilder
class. As you expand the TreeView control, each node represents
a routine and each subnode represents a called routine.
The Class view uses the call graph model to show cumulative
statistics for objects, routines, and called routines. The information
displayed on the right side of the display differs depending on
the current node on the left.
|
Current node |
Statistics displayed |
|---|---|
|
Application |
Statistics for each object |
|
Object |
Cumulative statistics for the object |
|
Routine |
Cumulative statistics for the routine |
You can sort items on the right by clicking the heading.
Class view metrics
The Class view displays five metrics. The profiling tool accesses
these metrics from instances of the ProfileCall and ProfileRoutine
objects. The time scale you specified in the Preferences dialog
box determines how times are displayed.
|
Metric |
What it means |
|---|---|
|
Hits |
The number of times a routine executed |
|
Self |
The time spent in the routine or line |
|
%Self |
Self as a percentage of the total time |
|
Self+Called |
The time spent in the routine or line |
|
%Self+Called |
Self+Called as a percentage |
About percentages
The percentages captured in the trace file are based on the
total time tracing was enabled. Because an application can be idle
(while displaying a MessageBox, for example), percentage metrics
are most meaningful when you control tracing programmatically, which
can help to minimize idle time. Percentages are least meaningful
when you create a trace file for a complete application.