Equinox Online Help - Language Reference - A to Z

Home

ProfileEvent

Applies to
SyntaxProfileEvent EventNumber [, Description, Flags, Action]
Action[Statement] Configures details of user event EventNumber
ScopeUsable anywhere
Notes

Supply EventNumber as a number between 6100 and 6199. This is the number used in the logs, to differentiate it from server requests and form events. Alternatively, use 0 to 99, which will be converted.

Supply Description as a short text string describing the event.

Flags may be set to True to summarise this event individually. If that is done, nested events and client-server requests that happen during this specific event are listed. Note that the configuration option +8 sets this flag for all events.

Action may have the following values:

  • 0 Do nothing
  • 1 Add a start event
  • 2 Add a message

The Action parameter is a convenience that avoid having to call ProfileEventStart in situations where the event is used once, or where it is useful to show a start point with a message.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryProfiling
See Also ProfileEventStart, ProfileEventStop, ProfileMessage, ProfileLog, ProfilePause, ProfileResume, ProfileReset, ProfileStatus
Example

This example demonstrates a one-off use of an event

ProfileEvent 6100, "Run end of day", true, 1 execute method "EndOfDay" ProfileStop

This example demonstrates two nested events where the execution time of the profiling statements is important

define PPCALCULATE 6110

ProfileEvent PPCALCULATE, "Time in ppCalculate"
ProfileEvent 6100, "Run end of day", true, 1

subtable Customer
FirstRecord

while not SysError
ProfileEventStart PPCALCULATE
ppCalculate
ProfileEventStop
nextrecord
end while

ProfileEventStop
end subtable | Customer