CPU Operations

CPU performance monitoring, profiling, and testing commands.

CPULoad

Run a CPU-Load test on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYescpuloadCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectNoAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersCPULoadOptionsNoparameterscpuload Options

CPULoad Options

AttributeTypeRequiredDefaultDescription
args[]stringYesArray of strings with arguments passed into the cpuload tool.
cpus[]integerYesArray of CPUs that should be put under load.
durationstringYesDuration of the load. Format: ^((\\d+h)?(\\d+m)?(\\d+s)?)?$
expectCPUExpectOptionsYesExpected values

CPULoad Example

cmd: cpuload
name: Check cpu frequencies with load
transport: *transport
options:
  timeout: 2m
parameters:
  duration: 1m
  expect:
    individual:
      - cpus: [0, 1, 2, 3, 4, 5, 6, 7]
        option: AverageFrequency
        value: ">1500"
      - cpus: [8, 9, 10, 11, 12, 13, 14, 15]
        option: AverageFrequency
        value: ">1200"

CPUSet

Set cpu profiles on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYescpusetCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectNoAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersCPUSetOptionsYesOptions passed into the cpuset cmd

CPUSet Options

AttributeTypeRequiredDefaultDescription
commandstringYesCommand to run. Available options: core, or profile.
cores[]integerNoArray of Cores where the command should be applied to. If not set apply to all
argstringYesValue of the command option

CPUSet Example

cmd: cpuset
name: Set ACPI Platform Profile to low-power
transport: *transport
parameters:
  command: profile
  arg: low-power

CPUStats

Monitor and validate CPU statistics on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYescpustatsCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectNoAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersCPUStatsOptionsYesparameterscpustats Options

CPUStats Options

AttributeTypeRequiredDefaultDescription
intervalstringNoTesting interval time
expectCPUExpectOptionsYesExpected values

CPU Expect Options

AttributeTypeRequiredDefaultDescription
general[]GeneralObjectNoexpectGeneral Expected Values
individual[]IndividualObjectNoIndividual CPU Expected Values

General Object

Values that describe the machine as a whole.

AttributeTypeRequiredDefaultDescription
optionstringNogeneralName of the option
valuestringNogeneralValue of the option

option must be one of:

OptionUnitDescription
CPUsLogicalcountLogical CPUs the machine reports
CPUsPhysicalcountPhysical cores the machine reports
ProfileACPI platform profile, for example balanced
CurPowerConsumptionwattsPackage power drawn during the sample
PowerLimit1wattsSustained package power limit
PowerLimit2wattsShort-term package power limit

Individual Object

Values measured per core. Cores that are switched off do not appear in the sample, and naming one fails the step rather than matching a different core.

AttributeTypeRequiredDefaultDescription
cpus[]integerYesindividualArray of CPUs where the option should be applied to
optionstringYesindividualName of the option
valuestringYesindividualValue of the option

option must be one of:

OptionUnitDescription
BusypercentShare of the sample the core spent executing
AverageFrequencyMHzMean frequency over the whole sample, idle time included
BusyFrequencyMHzMean frequency while the core was executing
CStatespercentIdle-state residency, written as C1E,C6,C10:>95

CStates takes one or more state names separated by commas, then a colon and the bound their residencies must add up to. Every other option compares a single number.

CPUStats Example

cmd: cpustats
name: Check cpu frequencies in idle
transport: *transport
parameters:
  interval: 10s
  expect:
    individual:
      - cpus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
        option: AverageFrequency
        value: "<500"

SysBench

Run SysBench on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYessysbenchCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersSysBenchOptionsYesOptions passed into the sysbench cmd

SysBench Options

AttributeTypeRequiredDefaultDescription
args[]stringNoArguments to pass to sysbench.
expect[]ExpectOptionsYesExpectations to check against the output of sysbench.

SysBench Expect Options

AttributeTypeRequiredDefaultDescription
optionstringYesOption to check
valuestringYesExpected value

SysBench Example

cmd: sysbench
name: Benchmark
transport: *transport
parameters:
  args: [cpu, --cpu-max-prime=20000, --threads=18, --time=60, run]
  expect:
    - option: EventsPerSecond
      value: <4500