HP Caliper User's Guide

Examples
Assume these command-line options:
-s 400000,10%,BRANCH_EVENT (also specified as --sampling-spec
400000,10%,BRANCH_EVENT)
--context-lines 10
You can replace them in the measurement configuration file or the .caliperinit
file with these lines:
sampling_spec = "400000, 10%, BRANCH_EVENT"
context_lines = 10
Hierarchy for Processing an Option Value
HP Caliper uses this sequential order to process an option value:
1. Default value for an option
2. Option variable setting in the specified measurement configuration file
3. Option variable setting in the .caliperinit file, if the file exists
4. Option value from the command line
Thus:
The command line overrides everything.
The .caliperinit file overrides the measurement configuration file.
The measurement configuration file overrides the default value.
-d or --database
-d database[,unique]
Saves measurement results to the named database in data collection runs.
Performance data is always saved to a database, whether one is explicitly specified or
not. You can use this option to save measurement results to a database that you name
instead of to the default database name. If you specify a relative or absolute pathname,
the file will be saved there. If you do not specify a pathname, the file is saved in the
current directory.
This option is particularly useful is you want to preserve measurement runs of the
same type.
If you use the unique qualifier, the process ID of the HP Caliper process is appended
to the name of the database it is writing to. There are two situations in which you might
want to use this qualifier:
When you are running HP Caliper many times and do not want to overwrite the
database contents with each run.
When you are running simultaneous HP Caliper processes, which would (without
this qualifier) try to write to the same database and cause corruption.
64 HP Caliper Options