Using TIBCO Hawk Methods

This section assumes you understand how to use TIBCO Hawk methods. It tells you which methods to use and the effect of each method

Tip: You can turn the Profiler on using properties, and turn it off using a function or Hawk method, as desired. See notes for be.engine.profile.duration in Profiler Configuration Properties .
Before you Begin
 Ensure that the property hawk.enabled is set to true in the CDD at the cluster level before the TIBCO BusinessEvents engine starts.
To turn the Profiler on
 Use the following method to turn on the Profiler:
StartFileBasedProfiler(String session, String fileName, int level, long duration)

The above method turns on the TIBCO BusinessEvents Profiler for the specified agent. The Profiler starts collecting data at the beginning of next RTC for the specified duration.

This method works the same way as the Engine.Profiler.startCollectingToFile() function (see Turning Profiler On and Off), except that it requires you to specify an agent class.

Input arguments are the same as the engine properties shown in Profiler Configuration Properties:

String session: If you want to monitor multiple agents, execute the method once for each, specifying the agent class name in each case. If there is only one agent, the session parameter is optional.

String fileName: See be.engine.profile.Agent_Class_Name.file

int level: See be.engine.profile.Agent_Class_Name.level

long duration: See be.engine.profile.Agent_Class_Name.duration

If you attempt to turn on the Profiler when it is already running, an error is returned, but the running Profiler is not affected.

To turn the Profiler off
 In your rule or rule function, use the following function to turn off the Profiler:
StopFileBasedProfiler(String session)

The above method turns off the TIBCO BusinessEvents Profiler and writes the profile data into a file for the specified agent when the current RTC has completed. You must execute the method once for each session, as needed.

If you attempt to turn off the Profiler when it is already off, an error is returned, but there is no effect on the Profiler.