HP Caliper Advisor Rule Writer Guide

('__get_ioblock', 'sweep3d', 1, 7, 7.0),
('__F90_END_IO', 'sweep3d', 1, 6, 6.0),
('_f80_to_dec', 'libc.so.1', 1, 6, 6.0),
('__io_tl1', 'sweep3d', 2, 11, 5.5)))
This example retrieves a list of the top 25 functions based on their instruction cache
miss average latency. If at least one dataset containing an icache miss histogram
exists, then the first such one is accessed, its data sorted by average latency, and
(up to) the top 25 functions are returned as a tuple of tuples. Each function contains
the name of the function, its image name, its number of icache misses, its total
icache miss latency, and the average latency of its misses.
metrics = object.get_histogram(ALAT, (FUNCTION, 1),
SAMPLE_COUNT)
metrics: ((('grow_arena', 'libc.so.1', 11), ), 21)
This example retrieves the function with the greatest number of ALAT misses and
the total count of ALAT misses. If at least one ALAT miss performance run was
made, then its dataset is accessed and the information about the function with the
most misses is returned as a tuple. The tuple contains the name of the function,
its image name, its miss count, and the total number of ALAT misses. If no ALAT
miss histogram data exists, then the None value is returned.
Note the special Python syntax for a tuple with only one member: a dangling
comma after the item.
Run Information Accessor Function: get_run_info
The syntax is:
get_run_info(metric_list)
get_run_info_nth(metric_list, n)
These accessor functions are used to retrieve information about the HP Caliper
measurement runs that supply the performance data returned by the other accessor
functions. These are the simplest of the accessor functions.
Every metric is available for every dataset. Unlike other accessor functions, where the
basic version is more frequently called than the nth version, get_run_info_nth()
is generally used more than get_run_info().
Two types of metrics are available from these accessor functions, each with its own
syntax:
Run information
Dataset ID
Run Information Accessor Function: get_run_info 47