5 HP Caliper Options

This chapter describes basic information about options and presents them in alphabetical order.

For a listing of the most commonly used options, see the HP Caliper Quick Start reference card.

Basic Information About Options

Options are used to customize the performance analysis. You can specify one or more options on the command line when you start HP Caliper. You can abbreviate options and their modifiers as long as they are unambiguous.

Options are preceded on the command line by two hyphens and may be followed by various modifiers. For example: --database myout. The most commonly used options also have a single-hyphen form. For example: -d myout. Note that the single-hyphen forms of the options precede the double-hyphen forms in this chapter.

In general, you can repeat an option on the command line. The command line is processed in order, with the values from a later option replacing the values from the earlier one. The earlier one is still processed, though, and must have correct syntax.

You can use an options file to specify command-line information, including the measurement, options, program, and program arguments. See “-f or --options-file” (p. 49) for details.

You can save option values in an initialization file that HP Caliper automatically uses at startup for data collection or data reporting runs. This file, .caliperinit, is not required, but is used if it is available. For more information, see “Specifying Option Values with a .caliperinit Initialization File” (p. 91).

Multiple Ways to Specify HP Caliper Option Values

You can specify options on the command line, in a measurement configuration file, or in the

.caliperinit file. There are some differences:

You replace any hyphen (-) in the command-line option name with an underscore (_) in the measurement configuration file or the .caliperinit file.

When assigning a value to a variable in the measurement configuration file or the

.caliperinit file, you enclose the value in double quotes unless it is a number or an HP Caliper constant such as True or False.

The measurement configuration files and the .caliperinit file are Python files and must contain executable Python code. Thus, you must use the equals sign (=) in assignment statements in these files. The equals sign is not necessary with HP Caliper command-line options except for two: --memory-usage=and --system-usage=.

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

Basic Information About Options 47