Skip to content

Configuring PBench

Steve Burnett edited this page May 2, 2024 · 25 revisions

NOTE:
This page will contain an explanation of stages and how to define stages by creating JSON files, what directory to put them in, and how to tell PBench to use the custom stages. Delete this note before publishing.

Creating a Stage File

Create a JSON file for each stage of a benchmark.

See Parameters for the format of stage JSON files.

Always begin with a description.

A child stage inherits some parameters such as catalog and schema from its parent if those parameters are not explicitly set in the child file. If a child stage has multiple parents, the child stage inherits those parameters from the first of the parent stages that finishes, which starts the child stage.

Creating a Query File

A query file is an SQL query that called by the QueryFiles parameter of a stage file. For an example, see query_01.sql.

Configuring Influx and MySQL Connections

pbench run allows specifying configuration for InfluxDB and MySQL. Create a file in the directory local to PBench similar to the following examples.

Example InfluxDB configuration file influx.json:

{
  "url": "https://example.com)",
  "org": "myorg",
  "bucket": "benchmark",
  "token": "*******=="
}

Use --influx influx.json with pbench run to call this file.

Example MySQL configuration file mysql.json:

{
  "username": "presto",
  "password": "*******",
  "server": "localhost",
  "database": "test"
}

Use --mysql mysql.json with pbench run to call this file.

Clone this wiki locally