How HP Caliper Saves Data in Databases

HP Caliper saves performance data for every measurement run to a database. This allows you to regenerate reports from the same performance data without having to rerun your application under HP Caliper. You have these capabilities:

You can generate a new report with different attributes from the saved data. This means that you do not have to rerun HP Caliper on the live program.

When you save the results to a database, you can create a snapshot of the program results to compare with subsequent versions of your program. This lets you compare the results of changes to your program.

You can merge the results of two or more databases.

You can compare (“difference”) the data collected in two databases.

For more information, see “Creating Reports from Multiple Databases” (page 114).

Names and Locations for the Databases

If you do not use the -doption to specify the name of the output database, by default, HP Caliper saves the database in the databases directory in a directory with the same name as the measurement. For example, if you are doing an scgprof measurement run, by default the database is named scgprof and is placed in the databases directory.

By default, the databases directory is a directory called .hp_caliper_databases in your current directory. This directory is only created when it is needed, specifically the first time you do not use a -doption to specify the name of the database. (See “Changing the Default Name and Location” (p. 113).) You can override the location and name of the databases directory by setting the CALIPER_DATABASES environment variable. For example, if you want all your databases to be saved in your current directory, you can set CALIPER_DATABASES to “.” If you do not want the databases saved at all, you can set CALIPER_DATABASES to /dev/null.

HP Caliper automatically creates a symbolic link named latest to point to the latest database file created, no matter what the file is named or where it is located.

The naming convention lets you easily run (and re-run) reports on your latest run for each measurement type. For example, if you make a cpu run, then an scgprof run, and then a dcache run, you can run reports on any of these later with these commands:

$ caliper report cpu

$ caliper report scgprof $ caliper report dcache

You can run a report on your most recent run by using this command:

$ caliper report latest

or simply:

$ caliper report

In the latter case, HP Caliper will assume that you want a report on latest and will use the database from your latest run.

When you give a database name for the caliper report or caliper advise commands without specifying a path, the databases search path is, in this order:

1.Current directory

2.Databases directory

Changing the Default Name and Location

You can use the -doption (see “-d or --database” (p. 48)) to specify a different name and/or location for the output database when you are collecting data. HP Caliper overwrites any existing database with the same path as the new database.

How HP Caliper Saves Data in Databases 113

Page 113
Image 113
HP UX Caliper Software manual How HP Caliper Saves Data in Databases, Names and Locations for the Databases, Or simply