yardstick.benchmark.scenarios.compute package

Submodules

yardstick.benchmark.scenarios.compute.cpuload module

Processor statistics and system load.

class yardstick.benchmark.scenarios.compute.cpuload.CPULoad(scenario_cfg, context_cfg)[source]

Bases: yardstick.benchmark.scenarios.base.Scenario

Collect processor statistics and system load.

This scenario reads system load averages and CPU usage statistics on a Linux host.

CPU usage statistics are read using the utility ‘mpstat’.

If ‘mpstat’ is not installed on the host usage statistics are instead read directly from ‘/proc/stat’.

Load averages are read from the file ‘/proc/loadavg’ on the Linux host.

Parameters:
  • - Time interval to measure CPU usage. A value of 0 (interval) – indicates that processors statistics are to be reported for the time since system startup (boot)
  • type – [int]
  • unit – seconds
  • default – 0
MPSTAT_FIELD_SIZE = 10
run(result)[source]

Read processor statistics.

setup()[source]

Scenario setup.

yardstick.benchmark.scenarios.compute.cyclictest module

class yardstick.benchmark.scenarios.compute.cyclictest.Cyclictest(scenario_cfg, context_cfg)[source]

Bases: yardstick.benchmark.scenarios.base.Scenario

Execute cyclictest benchmark on guest vm

Parameters:
  • - run thread #N on processor #N, if possible (affinity) – type: int unit: na default: 1
  • - base interval of thread (interval) – type: int unit: us default: 1000
  • - number of loops, 0 for endless (loops) – type: int unit: na default: 1000
  • - priority of highest prio thread (priority) – type: int unit: na default: 99
  • - number of threads (threads) – type: int unit: na default: 1
  • - dump a latency histogram to stdout after the run (histogram) –
    here set the max time to be tracked

    type: int unit: ms default: 90

  • link below for more fio args description (Read) – https://rt.wiki.kernel.org/index.php/Cyclictest
REBOOT_CMD_PATTERN = ';\\s*reboot\\b'
TARGET_SCRIPT = 'cyclictest_benchmark.bash'
WORKSPACE = '/root/workspace/'
run(result)[source]

execute the benchmark

setup()[source]

scenario setup

yardstick.benchmark.scenarios.compute.lmbench module

class yardstick.benchmark.scenarios.compute.lmbench.Lmbench(scenario_cfg, context_cfg)[source]

Bases: yardstick.benchmark.scenarios.base.Scenario

Execute lmbench memory read latency or memory bandwidth benchmark in a host

Parameters:- specifies whether to measure memory latency or bandwidth (test_type) – type: string unit: na default: “latency”
Parameters for memory read latency benchmark
stride - number of locations in memory between starts of array elements
type: int unit: bytes default: 128
stop_size - maximum array size to test (minimum value is 0.000512)
type: float unit: megabytes default: 16.0

Results are accurate to the ~2-5 nanosecond range.

Parameters for memory bandwidth benchmark
size - the amount of memory to test
type: int unit: kilobyte default: 128

benchmark - the name of the memory bandwidth benchmark test to execute. Valid test names are rd, wr, rdwr, cp, frd, fwr, fcp, bzero, bcopy

type: string unit: na default: “rd”
warmup - the number of repetitons to perform before taking measurements
type: int unit: na default: 0

more info http://manpages.ubuntu.com/manpages/trusty/lmbench.8.html

BANDWIDTH_BENCHMARK_SCRIPT = 'lmbench_bandwidth_benchmark.bash'
LATENCY_BENCHMARK_SCRIPT = 'lmbench_latency_benchmark.bash'
run(result)[source]

execute the benchmark

setup()[source]

scenario setup

yardstick.benchmark.scenarios.compute.perf module

class yardstick.benchmark.scenarios.compute.perf.Perf(scenario_cfg, context_cfg)[source]

Bases: yardstick.benchmark.scenarios.base.Scenario

Execute perf benchmark in a host

Parameters:
  • - perf tool software, hardware or tracepoint events (events) – type: [str] unit: na default: [‘task-clock’]
  • - simulate load on the host by doing IO operations (load) – type: bool unit: na default: false
  • more info about perf and perf events see https (For) – //perf.wiki.kernel.org
TARGET_SCRIPT = 'perf_benchmark.bash'
run(result)[source]

execute the benchmark

setup()[source]

scenario setup

yardstick.benchmark.scenarios.compute.unixbench module

class yardstick.benchmark.scenarios.compute.unixbench.Unixbench(scenario_cfg, context_cfg)[source]

Bases: yardstick.benchmark.scenarios.base.Scenario

Execute Unixbench cpu benchmark in a host The Run script takes a number of options which you can use to customise a test, and you can specify the names of the tests to run. The full usage is:

Run [ -q | -v ] [-i <n> ] [-c <n> [-c <n> ...]] [test ...]

-i <count> Run <count> iterations for each test – slower tests use <count> / 3, but at least 1. Defaults to 10 (3 for slow tests).
-c <n> Run <n> copies of each test in parallel.
Parameters for setting unixbench
run_mode - Run in quiet mode or verbose mode
type: string unit: None default: None
test_type - The available tests are organised into categories;
type: string unit: None default: None

iterations - Run <count> iterations for each test – slower tests use <count> / 3, but at least 1. Defaults to 10 (3 for slow tests).

type: int unit: None default: None
copies - Run <n> copies of each test in parallel.
type: int unit: None default: None

more info https://github.com/kdlucas/byte-unixbench/blob/master/UnixBench

TARGET_SCRIPT = 'unixbench_benchmark.bash'
run(result)[source]

execute the benchmark

setup()[source]

scenario setup

Module contents