HP Caliper User's Guide
$ cat /path/ls.sh
#!/bin/sh
ls
$ caliper ecount -p "(arg1)*ls.sh" /path/ls.sh
Reports information for: /bin/sh /path/ls.sh, but does not report ls.
• To select based on argv0:
$ caliper ecount -p "(arg0)ora*" ./sqlplus
Reports information on processes having ora as a prefix of their argument 0.
• To detach from unimportant processes:
$ caliper ecount -p "*" -p (ignore)basename ...
HP Caliper does not track or measure children of the detached process.
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
132 Configuring HP Caliper