Using HP Caliper in Your Build Process

You can integrate HP Caliper into your build process by including the HP Caliper commands in your makefile.

Using HP Caliper in Testing and Quality Assurance

Use these steps with new makefile targets for testing and quality assurance builds:

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. 158).

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

100 Configuring HP Caliper