SetTraceFileName

Description

Specifies the name of the trace file PowerBuilder will analyze when the BuildModel function is called.

Applies to

Profiling and TraceTree objects

Syntax

instancename.SetTraceFileName ( tracefilename )

Argument

Description

instancename

Instance name of the Profiling or TraceTree object

tracefilename

A string that identifies the name of the trace file PowerBuilder will analyze


Return value

ErrorReturn. Returns one of the following values:

  • Success! -- The function succeeded

  • FileOpenError! -- The file could not be opened

  • FileInvalidFormatError! -- The trace file is not in the correct format

  • ModelExistsError! -- A model has already been built

If an error occurs, the name is not set.

Usage

Use this function to specify the trace file PowerBuilder should analyze with the BuildModel function. You call the SetTraceFileName function before calling the BuildModel function.

Examples

This example provides the name of the trace file for which a performance analysis model is to be built:

Profiling lpro_model
String ls_line
 
lpro_model = CREATE Profiling
 
lpro_model.SetTraceFileName (filename)
ls_line = "CollectionTime = " + & 
      String(lpro_model.CollectionTime ) + "~r~n" & 
         + "Num Activities = " & 
         + String(lpro_model.NumberOfActivities) + "~r~n"
 
lpro_model.BuildModel()
...

See also

BuildModel