Loading
bdevperf: send test results in RPC response
When bdevperf test is triggered with 'bdevperf.py perform_tests' RPC
command, the tool starts test jobs and when they are finished, the
test results are printed on the console. This patch adds reporting
of the test results in RPC response. The response consists of two
sections, an object indicating the number of cores on which the tests
were run, and a table with test results. When a bdevperf is started
on 8 cores with a command:
'sudo ./build/examples/bdevperf -m 0xFF -z'
an example response to the command starting tests:
'sudo PYTHONPATH=python examples/bdev/bdevperf/bdevperf.py \
perform_tests -q 16 -o 4096 -t 5 -w write'
would be:
{
"results": [
{
"job": "Malloc0",
"core_mask": "0x1",
"workload": "write",
"status": "finished",
"queue_depth": 16,
"io_size": 4096,
"runtime": 5.000048,
"iops": 1200455.675625514,
"mibps": 4689.279982912164,
"io_failed": 0,
"io_timeout": 0,
"avg_latency_us": 13.252784244696382,
"min_latency_us": 11.130434782608695,
"max_latency_us": 222.6086956521739
},
{
"job": "Malloc1",
"core_mask": "0x2",
"workload": "write",
"status": "finished",
"queue_depth": 16,
"io_size": 4096,
"runtime": 5.000024,
"iops": 1216432.5611237066,
"mibps": 4751.689691889479,
"io_failed": 0,
"io_timeout": 0,
"avg_latency_us": 13.082916284986958,
"min_latency_us": 5.7043478260869565,
"max_latency_us": 90.82434782608695
}
],
"core_count": 2
}
Majority of the information provided in RPC response is the same as
information printed on the console. If the test finishes successfully,
it is indicated by:
"status": "finished"
If the test fails, it is indicated by:
"status": "failed"
If the bdevperf was terminated (SIGINT, SIGTERM sent to the process
or by Ctrl-C in the console window), it will be indicated by:
"status": "terminated"
The "runtime" field carries information about test execution time in
seconds, latencies are presented in microseconds.
If the test fails, "runtime" indicates the time when the test failed.
"core_count" provides number of cores that were actually used during
the test.
Change-Id: I327db7a57bdc1033b6803813d54861a6c970a718
Signed-off-by:
Marcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23881
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by:
Jim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Reviewed-by:
Karol Latecki <karol.latecki@intel.com>