HP Caliper Advisor Rule Writer Guide

Table 4-5 Metrics Available for Return by Run Information Accessor Functions (continued)
Description of What Is ReturnedReturn TypeMetric
The number of pthread threads in the measured process. This
value will be 0 unless the --threads all option was used on
the measurement run.
integerTHREAD_COUNT
The total user time of the measured process. The value is in
seconds.
HP Caliper report section: Target Execution Time User time.
floatUSER_TIME
Dataset ID
This is a special “metric” that returns the ID number of the dataset that supplied all of
the other metric values in the call. This metric is used as is, and is normally used in
conjunction with other metrics.
To retrieve this metric, use:
n
Returns the dataset ID number, an integer value.
Examples:
get_run_info(REAL_TIME, n)
get_run_info_nth(REAL_TIME, n, -1)
Examples of the Use of the Run Information Accessor Functions
metrics = object.get_run_info(CPU_FREQUENCY)
metrics: (1600000000)
This example retrieves the frequency of the CPU used for the first measurement
run.
metrics = object.get_run_info(REAL_TIME, USER_TIME,
SYSTEM_TIME)
metrics: (40.92424499999999, 40.162192564999998,
0.017941971000000001)
This example retrieves the real, user, and system time of the longest-running
measured process. This returns the metrics from the first dataset, but the datasets
are ordered by the Advisor from the longest-running process to the shortest-running
process.
metrics1 = object.get_metrics(IA64_INST_RETIRED,
NOPS_RETIRED,
CPU_CYCLES, BACK_END_BUBBLE.ALL, n)
if metrics1:
n = metrics1[4]
metrics2 = object.get_run_info_nth(REAL_TIME,
Run Information Accessor Function: get_run_info 51