Skip to content

Running PBench

Steve Burnett edited this page Jun 18, 2024 · 15 revisions

pbench run Commands and Options

Run ./pbench run --help to see the online help for pbench run.

Run a benchmark that is defined by a sequence of JSON configuration files.

Usage:
  pbench run [flags] [list of root-level benchmark stage JSON files]

Flags:
  -c, --comment string       Add a comment to this run (optional)
  -h, --help                 help for run
      --influx string        InfluxDB connection config for run recorder (optional)
      --mysql string         MySQL connection config for run recorder (optional)
  -n, --name string          Assign a name to this run. (default: "<main stage name>-<current time>")
  -o, --output-path string   Output directory path (default "current directory")
  -p, --password string      Presto user password (optional)
      --pulumi string        (only works when a MySQL run recorder is specified) Pulumi API config for storing deployment details with MySQL (optional)
  -k, --rand-skip int        Skip the first N random selections from the sequence (optional)
  -e, --seed int             Random seed for randomized execution (default 1712866111317118)
  -s, --server string        Presto server address (default "http://127.0.0.1:8080")
  -u, --user string          Presto user name (default "pbench")

NOTE:
(OS X only)

On OS X when PBench is first run, a message may be displayed similar to the following:

“pbench_arm64” can’t be opened because Apple cannot check it for malicious software.”

Run the following command before extracting the tar file:

xattr -d com.apple.quarantine pbench

For more information, see Open a Mac app from an unidentified developer.

-c, --comment string (optional)

Add a comment to this run that is saved to a MySQL or InfluxDB database. Must use --influx string or --mysql string with -c.

-h, --help

Display the help for pbench run.

--influx string (optional)

InfluxDB connection configuration for run recorder. For example, if the configuration is in a JSON file in the local directory, this option would be --influx influx.json. Optionally, add a comment saved to the database using -c. See InfluxDB.

--mysql string (optional)

MySQL connection configuration for run recorder. For example, if the configuration is in a JSON file in the local directory, this option would be --mysql mysql.json. Optionally, add a comment saved to the database using -c. See MySQL.

-n, --name string

Assign a name to the benchmark run.

If -n is not used, the default run name is <main stage name>_<current time>.

See Run Directory for explanations and examples.

-o, --output-path string

The output directory to write benchmark output files to, relative to the current directory that pbench run is run from.

If -o is not used, the default is the current directory.

See Output Directory for explanations and examples.

-p, --password string (optional)

Password for the Presto server.

--pulumi string (optional)

Pulumi API connection configuration for run recorder. For example, if the configuration is in a JSON file in the local directory, this option would be --pulumi pulumi.json.

Using --pulumi requires a MySQL connection configuration specified with --mysql.

-k, --rand-skip int (optional)

Skip the first int selections from the random sequence.

-e, --seed int

Random seed for randomized execution. Specify the source seed to reproduce the same random sequence.

The default seed value is 1712866111317118.

-s, --server string

The Presto server address. The default is http://127.0.0.1:8080.

-u, --user string

Username for the Presto server. The default username is pbench.

[list of root-level benchmark stage JSON files]

Include one or more stage JSON files that PBench combines to run the benchmark.

Because PBench combines the stage JSON files to define the benchmark, the base folder used to evaluate relative paths in all of the stage JSON files. For example, in the benchmarks directory, running the command

pbench run java.oss.json tpc-ds/sf10.json tpc-ds/ds_power.json xyz.json

uses benchmarks as the base directory to evaluate all relative paths in all of the stage JSON files.