HP Caliper Advisor Rule Writer Guide
The only argument passed to a rule function is the analysis object. It is implemented
as a Python class with a few data members and some function members. The data
members provide very basic information about the analysis object (object type, object
name, processor type, and so forth). The function members can be accessor functions
or the advice function. An accessor function provides access to all of the object’s
performance data. The advice function generates advice about the application's
performance.
To the Advisor, there are two different hierarchies present in an application:
• Physical hierarchy
• Execution hierarchy
An analysis object’s type reflects one of these hierarchies, as well as a level within that
hierarchy. The type controls how performance data is filtered and processed.
Physical objects (kernel, executable, image, and function) relate to a tangible entity and
allow rules to access performance data across all executions of that entity. Execution
objects (system, application, process, thread) relate to a temporal entity and allow rules
to access performance data across all physical items present in that execution.
An analysis object’s level causes a rule to focus on only a subset of an entire application.
Each rule can usually only analyze objects of a particular type. For example, one rule
might analyze executable objects and deal with the performance of all of their images
and functions at a high level. Another rule might analyze function objects and drill
down into the performance details of individual functions, unaware of anything else.
Although the current version of the Advisor only supports executable objects, it is
important that rule writers be aware of the other types so that rules written today will
still work correctly in the future.
Each analysis object has data members that can be directly accessed by a rule, as shown
in Table 3-1 “Analysis Object Data Members”. There are also some predefined constant
enumeration values (shown in all caps in the table) that a rule can use for comparisons.
Table 3-1 Analysis Object Data Members
DescriptionTypeData
Contains the CPU frequency of the reference dataset. The value is in Hz.integercpu_frequency
Contains the CPU model of the reference dataset. One of the following:
ITANIUM2_CPU, ITANIUM2_6M_CPU, ITANIUM2_9M_CPU, or
MONTECITO_CPU.
integercpu_model
Contains the number of datasets with performance data for this object.integerdataset_count
Contains the last modified data of physical objects or zero for execution objects.
The value is “Unix time” (the number of seconds since 1/1/1970 00:00:00 GMT).
integerdate
Contains the invocation of the reference dataset.stringinvocation
Contains the simple name of the object.stringname
Analysis Objects: Concepts 31