-
Notifications
You must be signed in to change notification settings - Fork 18
Configuring PBench
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.
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.
Use the next parameter in a stage file to define the order of stage files in a benchmark run.
For example, consider the four files stage1.json, stage2.json, stage3.json, and stage4.json:
.. image:: stage-flow.png :width: 400 :alt: a simple stage flow diagram
-
stage1.jsonhas the following entry fornext:
"next": [
"stage_2.json",
"stage_3.json"
]-
stage2.jsonandstage3.jsonhave the following entry:
"next": [
"stage_2.json",
"stage_3.json"
]-
stage4.jsonis the last stage of the benchmark run and has nonextparameter entry.
For more information see next.
A query file is an SQL query that called by the QueryFiles parameter of a stage file. For an example, see query_01.sql.
Save connection information for InfluxDB and MySQL connections in configuration files, then use those configuration files with pbench run with the --influx and --mysql command options.
NOTE:
An example configuration template for InfluxDB namedinfluxdb.template.jsoncan be found in the PBench repository. Copyinfluxdb.template.jsonto the directory local to PBench and edit it as appropriate.
Create a file named influxdb.json similar to the following example and edited as appropriate in the directory local to PBench.
Use --influx influxdb.json with pbench run to call the new file.
{
"url": "https://example.com)",
"org": "myorg",
"bucket": "benchmark",
"token": "*******=="
}NOTE:
An example configuration template for MySQL namedmysql.template.jsoncan be found in the PBench repository. Copymysql.template.jsonto the directory local to PBench and edit it as appropriate.
Create a file named mysql.json similar to the following example and edited as appropriate in the directory local to PBench.
Use --mysql mysql.json with pbench run to call the new file.
{
"username": "presto",
"password": "*******",
"server": "localhost",
"database": "test"
}