Finch Docs
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Stage File

Stage files are YAML format. This is a quick reference with fake but syntactically valid values:

stage:
  disable: false
  name: "read-only"
  qps: "1,000"
  runtime: "60s"
  tps: "500"
  
  compute:
    disable-local: false
    instances: 0

  mysql:
    # Override mysql from _all.yaml

  params:
    # Override params from _all.yaml

  stats:
    # Override stats from _all.yaml

  trx:
    - name: "foo" ##########
      file: "trx/foo.sql"  #
      data:                #
        d:                 #
          generator: "int" #
                           #
  workload:                #
    - trx: ["foo"] #########
      clients: 1
      db: ""
      iter: "0"
      iter-clients: "0"
      iter-exec-group: "0"
      qps: "0"
      qps-clients: "0"
      qps-exec-group: "0"
      runtime: "0s"
      tps: "0"
      tps-clients: "0"
      tps-exec-group: "0"

stage

A stage file starts with a top-level stage: declaration.

disable

  • Default: false
  • Value: boolean

Disable the stage entirely if true.

name

  • Default: base file name
  • Value: string

The stage name.

qps

Queries per second (QPS) limit for all clients, all execution groups.

runtime

How long to run the stage. If zero and there are no data limits, use CTRL-C to stop the stage and report stats.

tps

Transaction per second (TPS) limit for all clients, all execution groups.


compute

disable-local

  • Default: false
  • Value: boolean

If true, the local Finch instances does not count as 1 compute.

instances

The number of compute instances that Finch requires to run the benchmark.


mysql

See mysql in all.yaml.


params

See params in all.yaml.


stats

See stats in all.yaml.


trx

The trx section is a required list of Finch trx files to load.

stage:
  trx:
    - file: trx/A.sql
      name: foo

    - file: trx/B.sql
      # name defaults to B.sql

file

  • Default: (none; must be set explicitly)
  • Value: file name

Sets one Finch trx file to load. Paths are relative to the directory of the stage file.

data

  • Default: (none; must be set explicitly)
  • Value: map keyed on data key name without @ prefix

Every data key in a trx file must be defined in the stage file.

stage:
  trx:
    - file: foo.sql         # uses @d
      data:
        d:                  # key for @d
          generator: "int"  # __REQUIRED__
          scope: "trx"      # optional
          params:           # generator-specific
            max: "10,000"   #

Only generator is required, but you usually need to specify params too.

Only @d (“d” in the stage file) is shown here, but every data key in a trx file must be defined in the data map.

d.data-type

  • Default: “n”
  • Value: “n” or “s”

Indicates column type: “n” for a numeric value, or “s” for a string (quoted) value.

d.generator

Name of the data generator to use for the data key.

d.params

  • Default: (none)
  • Value: key-value map of strings

Generator-specific params. These are optional but usually needed. See Data / Generators

d.scope

  • Default: statement
  • Value: "" or “statement”, “trx”, “client”

Scope of data generator. If not specified (empty string), the default is “statement”. See Data / Scope.

name

  • Default: Base file name
  • Value: any string

Set trx name used in workload.trx list.

workload

The workload section declares the workload that references the trx section.

clients

Number of clients to run in client group.

db

  • Default: (none)
  • Value: database name

Deafult client group database. See Operate / MySQL / Default Database Makes clients in client group execute USE db on prepare.

iter

iter-clients

iter-exec-group

Maximum number of iterations to execute per client, client group, or execution group (respectively).

qps

qps-clients

qps-exec-group

Maximum rate of queries per second (QPS) per client, client group, or execution group (respectively).

runtime

Runtime limit

tps

tps-clients

tps-exec-group

Maximum rate of transaction per second (TPS) per client, client group, or execution group (respectively).

trx

  • Default: none or auto
  • Value: list of trx.name

Trx assigned to all clients to execute.