Profiling object

The Profiling object is used to analyze the performance of a PowerBuilder application. It provides a performance analysis model listing all the routines (both functions and events) logged in a given trace file. It includes the functions you call to name the trace file to be analyzed, build the model, and list the classes and routines included in the model. You use the Profiling object in conjunction with the ProfileCall, ProfileClass, ProfileLine, and ProfileRoutine objects.

The Profiling object has no events.

Properties

Profiling property

Datatype

Description

ApplicationName

String

The name of the application used to generate the trace file.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

CollectionTime

Decimal

The amount of time taken (in seconds) by the collection of trace data. This time has already been accounted for in the timestamps from the trace file (that is, the proper amount of time is subtracted from the timestamps before they are put in the trace file). If no model has been created, NULL is returned.

NumberOfActivities

Long

The total number of activities that exist in the trace file. The value is 0 if this property is called before the trace file name is set.

TraceFileName

String

The name of the trace file to use to build the model. The value is an empty string if the name has not been successfully set.


Functions

Profiling function

Datatype returned

Description

BuildModel

ErrorReturn (enumerated)

Builds a performance analysis model based on the previously specified trace file

ClassList

ErrorReturn (enumerated)

Provides a list of the classes (defined as ProfileClass objects) included in the model

ClassName

String

Returns the name assigned to the object

DestroyModel

ErrorReturn (enumerated)

Destroys the current performance analysis model

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service

GetParent

PowerObject

Returns a reference to the name of the parent object

RoutineList

ErrorReturn (enumerated)

Provides a list of the routines (defined as ProfileRoutine objects) included in the model

SetTraceFileName

ErrorReturn

Indicates the name of the trace file to use for analysis and validates the header format

SystemRoutine

ProfileRoutine

Provides the routine node (defined as a ProfileRoutine object) representing the system root

TypeOf

Object (enumerated)

Returns the type of the object