# test name 
name: "bench_sysbench"
creator: "cwen"
# type is the type of the test, supported type: prepare / test
# we will run the prepare tests before all test tests
type: "test"
tags:
  - bench

environment: 
  # machine resources
  resources:
    limits:
      cpu: 4000m
      memory: 16Gi
    requests:
      cpu: 2000m
      memory: 8Gi
  # image is a docker execution image for running test 
  # default image: hub.pingcap.net/schrodinger/agent:latest
  image: hub.pingcap.net/schrodinger/sysbench_agent:latest

  # execution arguments
  args: "--txn_auto_retry=true"

# manual for users 
manual:
  # description is to introduce the test purpose and instructions for this case.
  description: |-
    sysbench
  # describe the purpose of the parameters and optional values
  parameters: |-
    restore-warm-up: warm up time after retore cluster
    warm-up-time: warm up time after prepare
    db: database name
    table-count: number of tables
    table-size: number of rows per table
    threads: number of threads to use
    max-time: limit of total exection time in seconds
    report-interval: periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [30]
    percentile: percentile to calculate in latency statistics (1-100). Use the special value of 0 to disable percentile calculations [99]
    parepare: prepare data before to run sysbench test
    warm-up-data: warm up data before to run sysbench test
    restore: restore cluster from backup before to run sysbench test
    operation: operation oltp/insert/select/update, default value oltp
    backup-name: the name of backup uesed to restore cluster
    threshold: control to analyze sysbench's intermediate results
    rand-type: random numbers distribution uniform/gaussian/special/pareto default value special
    rand-pareto-h: parameter h for pareto distribution, default value 0.2
    txn_auto_retry: Open txn retry
  # notes is to list all matters which need to be noted
  # eg: the special requirements of the test environment
  notes: |-
    If there is an error, the bench_sysbench will fail to run.
