Benchmarking

System performance benchmarking and power state testing commands.

AMD S2Idle

Test AMD S2Idle (suspend-to-idle) functionality using the AMD debug tools. This command runs comprehensive suspend/resume cycle testing with detailed validation and reporting.

AttributeTypeRequiredDefaultDescription
cmdconstYesamd-s2idleCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersAMDS2IdleOptionsNoOptions passed into the amd-s2idle tool

AMD S2Idle Options

AttributeTypeRequiredDefaultDescription
countintegerNo10Number of suspend/resume cycles to run
durationintegerNo10Duration of each suspend cycle in seconds
waitintegerNo4Time to wait before starting each cycle in seconds
formatstringNostdoutFormat of the report to produce. Options: html, txt, md, stdout
report_filestringNoFile path to write the report to (only applicable if format is html, txt, or md)
forcebooleanNofalseRun test cycle even if the system fails prerequisite checks
randombooleanNofalseRun sleep cycles with random durations and waits (using duration and wait as upper bounds)
logindbooleanNofalseUse systemd-logind to suspend the system
tool_debugbooleanNofalseEnable debug logging for the tool
bios_debugbooleanNofalseEnable BIOS/firmware debug logging

AMD S2Idle Examples

Basic Usage

cmd: amd-s2idle
name: Run AMD S2Idle test with defaults
transport:
  proto: ssh
  options:
    host: "[[attributes.Host]]"
    user: root

Custom Parameters

cmd: amd-s2idle
name: Run extended AMD S2Idle test
transport:
  proto: ssh
  options:
    host: "[[attributes.Host]]"
    user: root
options:
  timeout: 30m
parameters:
  count: 20
  duration: 15
  wait: 5
  format: html
  report_file: /tmp/s2idle-report.html

With Debug Logging

cmd: amd-s2idle
name: Run AMD S2Idle test with debug logging
transport:
  proto: ssh
  options:
    host: "[[attributes.Host]]"
    user: root
parameters:
  count: 5
  duration: 10
  tool_debug: true
  bios_debug: true

S0ix-Selftest

Test S0ix (suspend-to-idle) power state functionality.

AttributeTypeRequiredDefaultDescription
cmdconstYess0ix-selftestCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options

S0ix-Selftest Example

cmd: s0ix-selftest
name: Run s0ix selftest
transport: *transport

Expect Comparator Syntax

The fio, iperf3, and stress-ng steps assert measured metrics against comparator strings. Empty (or omitted) means “no assertion”.

FormMeaning
<NMeasured value must be ≤ N
>NMeasured value must be ≥ N
=NMeasured value must equal N
N-MMeasured value must be within [N, M]

All comparisons are integer. Float metrics (bandwidth, latency, ops/sec) are truncated before comparison.

Fio

Run fio on the DUT and assert against parsed metrics. The fio binary must be installed on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesfioCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options (default timeout 2m)
parametersFioOptionsYesOptions passed into the fio cmd

Fio Options

AttributeTypeRequiredDefaultDescription
args[]stringNorandread 4k 1G 30s jobRaw arguments passed to fio. If omitted, runs a default randread workload against /tmp/contest-fio-<nano>.dat. --output-format=json auto-added.
expectFioExpectNoPer-metric assertions. See Expect Comparator Syntax.

Fio Expect Options

Assertions run against the first job in fio’s JSON output.

AttributeTypeRequiredDescription
ReadBWstringNoRead bandwidth in KiB/s
ReadIOPSstringNoRead IOPS
ReadLatMeanstringNoMean read latency in nanoseconds
WriteBWstringNoWrite bandwidth in KiB/s
WriteIOPSstringNoWrite IOPS
WriteLatMeanstringNoMean write latency in nanoseconds

Fio Example

cmd: fio
name: Random read bandwidth
transport: *transport
parameters:
  args:
    - --name=randread
    - --filename=/tmp/fio.dat
    - --rw=randread
    - --bs=4k
    - --size=512M
    - --runtime=20
    - --time_based
  expect:
    ReadIOPS: ">5000"
    ReadLatMean: "<200000"

Iperf3

Run iperf3 in client mode against a remote server and assert against the bandwidth summary. The iperf3 binary must be installed on the DUT, and an iperf3 -s peer must be reachable.

AttributeTypeRequiredDefaultDescription
cmdconstYesiperf3Command Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options (default timeout 2m)
parametersIperf3OptionsYesOptions passed into the iperf3 cmd

Iperf3 Options

AttributeTypeRequiredDefaultDescription
args[]stringYesRaw arguments passed to iperf3. Must include -c <host> (client mode); server mode is out of scope. -J auto-added.
expectIperf3ExpectNoPer-metric assertions. See Expect Comparator Syntax.

Iperf3 Expect Options

Assertions run against end.sum_received (TCP) or end.sum (UDP).

AttributeTypeRequiredDescription
BitsPerSecondstringNoThroughput in bits per second
BytesstringNoTotal bytes transferred
SecondsstringNoTest duration in seconds
RetransmitsstringNoRetransmit count (TCP only; absent for UDP)

Iperf3 Example

cmd: iperf3
name: Throughput to lab server
transport: *transport
parameters:
  args: [-c, 10.0.0.5, -t, "10"]
  expect:
    BitsPerSecond: ">900000000"
    Retransmits: "<10"

Stress-NG

Run stress-ng on the DUT and assert against the --metrics-brief rows aggregated across all stressors. The stress-ng binary must be installed on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesstress-ngCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options (default timeout 2m)
parametersStressNGOptionsYesOptions passed into the stress-ng cmd

Stress-NG Options

AttributeTypeRequiredDefaultDescription
args[]stringNo--cpu 0 --timeout 30s --metrics-briefRaw arguments passed to stress-ng. If supplied, must include --metrics-brief so per-stressor metric rows are emitted.
expectStressNGExpectNoPer-metric assertions. See Expect Comparator Syntax.

Stress-NG Expect Options

Values are summed across every stressor row in the output.

AttributeTypeRequiredDescription
BogoOpsstringNoSum of bogo-ops across all stressors
BogoOpsPerSecRealTimestringNoSum of bogo-ops/sec (real-time column) across all stressors
BogoOpsPerSecUsrSysstringNoSum of bogo-ops/sec (usr+sys column) across all stressors

Stress-NG Example

cmd: stress-ng
name: CPU stress baseline
transport: *transport
parameters:
  args: [--cpu, "0", --timeout, 60s, --metrics-brief]
  expect:
    BogoOpsPerSecRealTime: ">1000"