Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# 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 Using PropertiesSet the following properties in the Cluster Deployment Descriptor (CDD) Processing Unit tab, for all processing units (engines) whose RTC performance you want to profile.Profiler Configuration Properties (Sheet of )PropertyNotesbe.engine.profile.Agent_Class_Name.enableIf set to true, enables Profiler for the specified agent class (Agent_Class_Name) when the agent initializes.Default is false.be.engine.profile.*.enableIf set to true, enables the Profiler for all agents when each agent initializes, even when a specified agent class Profiler is disabled.Default is false.be.engine.profile.Agent_Class_Name.fileThe name of output file that the Profiler writes to, for the specified agent (Agent_Class_Name).Default behavior is as follows:If be.engine.profile.*.file is specified and be.engine.profile.Agent_Class_Name.file is not specified, then the file name is the value of be.engine.profile.*.file, with the Agent_Class_Name appended.If the properties be.engine.profile.*.file and be.engine.profile.Agent_Class_Name.files are not specified the name is created as follows: be-profile_Agent_Class_Name.csvbe.engine.profile.*.fileThe default (prefix for the) name of the output file that the Profiler writes to. In all cases, the appropriate Agent_Class_Name is appended.Default name is be-profile.csv and it is located under the current working directory, if file name is not specified.be.engine.profile.Agent_Class_Name.duration Specifies the duration of profile data collection in seconds, for the specified Agent_Class_Name).When the duration period ends, the Profiler continues to collect statistics for the current RTC until the RTC is completed, then outputs data and stops. So the RTC in progress is always completed, even if the Profiler is directed to stop during an RTC.If you set duration to a value of zero or less (<= 0), then profiling continues until agent stops or Profiler is explicitly turned of using a function or Hawk method.Default is -1.be.engine.profile.*.durationSpecifies the duration of profile data collection in seconds, for all agents.When the duration period ends, the Profiler continues to collect statistics for the current RTC until the RTC is completed, then outputs data and stops. So the RTC in progress is always completed, even if the Profiler is directed to stop during an RTC.If you set duration to a value of zero or less (<= 0), then profiling continues until the agents stop or Profiler is explicitly turned of using a function or Hawk method.When be.engine.profile.Agent_Class_Name.duration and be.engine.profile.*.duration are both present, the duration specified in be.engine.profile.Agent_Class_Name.duration takes precedence.Default is -1.be.engine.profile.Agent_Class_Name.levelLevel of depth that profile data will be collected for the specified agent (Agent_Class_Name):-1: all levels of profile data are collected, including RTC level and conditions and actions within the RTC.1: Only RTC level of profile data will be collected (and no condition and action data).Default is -1.be.engine.profile.*.levelLevel of depth that profile data will be collected for all agents:-1: all levels of profile data are collected, including RTC level and conditions and actions within the RTC.1: Only RTC level of profile data will be collected (and no condition and action data).When be.engine.profile.Agent_Class_Name.level and be.engine.profile.*.level are both present, the level specified in be.engine.profile.Agent_Class_Name.level takes precedence.Default is -1..
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 the 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 Using PropertiesSet the following properties in the Cluster Deployment Descriptor (CDD) Processing Unit tab, for all processing units (engines) whose RTC performance you want to profile.Profiler Configuration Properties (Sheet of )PropertyNotesbe.engine.profile.Agent_Class_Name.enableIf set to true, enables Profiler for the specified agent class (Agent_Class_Name) when the agent initializes.Default is false.be.engine.profile.*.enableIf set to true, enables the Profiler for all agents when each agent initializes, even when a specified agent class Profiler is disabled.Default is false.be.engine.profile.Agent_Class_Name.fileThe name of output file that the Profiler writes to, for the specified agent (Agent_Class_Name).Default behavior is as follows:If be.engine.profile.*.file is specified and be.engine.profile.Agent_Class_Name.file is not specified, then the file name is the value of be.engine.profile.*.file, with the Agent_Class_Name appended.If the properties be.engine.profile.*.file and be.engine.profile.Agent_Class_Name.files are not specified the name is created as follows: be-profile_Agent_Class_Name.csvbe.engine.profile.*.fileThe default (prefix for the) name of the output file that the Profiler writes to. In all cases, the appropriate Agent_Class_Name is appended.Default name is be-profile.csv and it is located under the current working directory, if file name is not specified.be.engine.profile.Agent_Class_Name.duration Specifies the duration of profile data collection in seconds, for the specified Agent_Class_Name).When the duration period ends, the Profiler continues to collect statistics for the current RTC until the RTC is completed, then outputs data and stops. So the RTC in progress is always completed, even if the Profiler is directed to stop during an RTC.If you set duration to a value of zero or less (<= 0), then profiling continues until agent stops or Profiler is explicitly turned of using a function or Hawk method.Default is -1.be.engine.profile.*.durationSpecifies the duration of profile data collection in seconds, for all agents.When the duration period ends, the Profiler continues to collect statistics for the current RTC until the RTC is completed, then outputs data and stops. So the RTC in progress is always completed, even if the Profiler is directed to stop during an RTC.If you set duration to a value of zero or less (<= 0), then profiling continues until the agents stop or Profiler is explicitly turned of using a function or Hawk method.When be.engine.profile.Agent_Class_Name.duration and be.engine.profile.*.duration are both present, the duration specified in be.engine.profile.Agent_Class_Name.duration takes precedence.Default is -1.be.engine.profile.Agent_Class_Name.levelLevel of depth that profile data will be collected for the specified agent (Agent_Class_Name):-1: all levels of profile data are collected, including RTC level and conditions and actions within the RTC.1: Only RTC level of profile data will be collected (and no condition and action data).Default is -1.be.engine.profile.*.levelLevel of depth that profile data will be collected for all agents:-1: all levels of profile data are collected, including RTC level and conditions and actions within the RTC.1: Only RTC level of profile data will be collected (and no condition and action data).When be.engine.profile.Agent_Class_Name.level and be.engine.profile.*.level are both present, the level specified in be.engine.profile.Agent_Class_Name.level takes precedence.Default is -1.:

`String` `session`: If you want to monitor multiple agents, run the method once for each agent, specifying the agent class name in each case. But when 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. It writes the profile data into a file for the specified agent when the current RTC is completed. You must run 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.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.