HP Caliper User Guide Release 5.5 (5900-2351, August 2012)

1. Make predefined HP Caliper performance measurements using your sample data sets.
2. Compare HP Caliper results with results from previous builds to identify performance
improvements or regressions.
Using HP Caliper to Generate Test Suite Reports
To automatically generate HP Caliper reports during your builds on HP-UX (for example, in test
suites), use entries in your makefile such as these:
#
# Makefile rule for generating some common performance reports.
#
performance_reports: main_program
/opt/caliper/bin/caliper ecount -o main_program.ecount main_program
/opt/caliper/bin/caliper fprof -o main_program.fprof main_program
Attaching to a Running Process to Perform Measurements
HP Caliper offers the ability to attach to one or more running process to perform measurements.
This feature can be particularly useful to measure daemon processes.
For sampled measurements you can attach to a running process and detach from the process after
a specified duration for these measurements:
alat
branch
cpu
cstack
dcache
dtlb
ecount
fprof
icache
itlb
pmu_trace
scgprof
traps
NOTE: For information about attaching to a running process for precise measurements, see
Attaching to a Running Process to Perform Precise Measurements ” (p. 159).
To attach to a process, you must specify the process ID (PID). The syntax is:
caliper measurement [options] pid[ pid][ ...]
The process IDs should be placed at the end of the command line. Do not specify a target program
name.
For example:
$ caliper fprof 7654 8624
To specify the length of time before detaching and reporting, use the -e seconds option. The
value of seconds represents the number of real-time seconds HP Caliper is attached to the process.
The exact placement of -e seconds is not significant.
Some example command lines are:
$ caliper fprof -e 15 /usr/bin/ls -R
$ caliper fprof -e 20 7654
100 Configuring HP Caliper