The ordering of rule files and databases on the command line makes no difference to the results produced by the Advisor. The only exception is in the case where the databases contain data from different, incompatible systems for the same executable object.

If you want to use multiple rule files, consider writing a “super” rule file that merely ‘includes’ the real rule files. If you do this, only the super rule file needs to be given on the command line. If that rule file is named default, then you don't need to use the --rule-filesoption.

You can add frequently used command-line options as variables to the .caliperinit file to save typing. Just remember that .caliperinit variable names have slightly different spelling: the command-line-equivalent hyphen (-) is replaced with the underscore (_).

How the HP Caliper Advisor Works

Here is a simplified explanation of how the Advisor works to clarify how analysis objects are selected and which performance data is used:

1.The command-line options and .caliperinit variable settings are processed and verified. If there are any errors, they are reported and the run terminates.

If no databases are specified, all the databases in the databases directory are opened and validated. If there are any errors, the errors are reported and the run terminates. If there is no data to analyze, the Advisor prints a “how to get started” help message and the run terminates.

2.All the specified databases are opened and validated. If there are any errors, they are reported and the run terminates.

3.All the databases are scanned for executable objects to analyze that match the selection criteria. By default, all objects with performance data are analyzed. Alternatively, you can use the --analysis-focusoption or the analysis_focus variable in the .caliperinit file to choose specific objects to analyze. If multiple versions of the same object exist, the one with the most recent modification date/time is chosen and the older versions are ignored. The list of objects to analyze is now sorted in alphabetic name order.

If the Advisor cannot find any of the requested objects in the databases given, the run terminates with an appropriate message.

4.For each executable object to be analyzed, all consistent performance data for that object is identified within the databases. To be consistent, only performance data that was collected on the same type of system (operating system, processor type, and processor speed) is used. The first measurement instance of each analysis object is used as the system type to match. Performance data collected on a different type of system is not used in the analysis.

5.All the specified rule files are read and precompiled in the order given by the --rule-filesoption or the rule_files variable in the .caliperinit file. If no rule files are provided, then the default rule file is used.

Each rule file is a Python script containing one or more independent rule functions. When called later, each rule function retrieves the needed performance data for the object being analyzed, makes decisions about a possible performance problem, and, if appropriate, generates one or more advice messages.

6.For each application object to be analyzed, a new report is started, all rule functions are called for that one object, and all applicable advice is gathered, sorted, and printed.

84 Using the HP Caliper Advisor

Page 84
Image 84
HP UX Caliper Software manual How the HP Caliper Advisor Works