histograms: tests for bdev histograms

This patch adds tests for bdev histograms using bdevperf.

Patch also adds bdev_rpc dependency in bdevrpc Makefile
to enable histograms RPC calls in bdevperf.


Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I1e0e94933936864df441e49f0016f9aa7705a7e2

Reviewed-on: https://review.gerrithub.io/c/437640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Piotr Pelplinski 2018-12-14 11:09:22 +01:00 committed by Jim Harris
parent 4620386417
commit 0656ba9437
2 changed files with 19 additions and 3 deletions

View File

@ -41,6 +41,6 @@ C_SRCS := bdevperf.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += event_bdev event_copy
SPDK_LIB_LIST += bdev copy event trace log conf thread util rpc jsonrpc json sock
SPDK_LIB_LIST += bdev copy event trace log conf thread util rpc bdev_rpc jsonrpc json sock
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -36,8 +36,24 @@ echo "BdevIoCacheSize 1" >> $testdir/bdevperf.conf
echo "[AIO]" >> $testdir/bdevperf.conf
echo "AIO $testdir/aio.bdev aio0 4096" >> $testdir/bdevperf.conf
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w write -t 1
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w read -t 1
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w write -t 5 -r /var/tmp/spdk.sock &
bdev_perf_pid=$!
waitforlisten $bdev_perf_pid
$rpc_py enable_bdev_histogram aio0 -e
sleep 2
$rpc_py get_bdev_histogram aio0 | $rootdir/scripts/histogram.py
$rpc_py enable_bdev_histogram aio0 -d
wait $bdev_perf_pid
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w read -t 5 -r /var/tmp/spdk.sock &
bdev_perf_pid=$!
waitforlisten $bdev_perf_pid
$rpc_py enable_bdev_histogram aio0 -e
sleep 2
$rpc_py get_bdev_histogram aio0 | $rootdir/scripts/histogram.py
$rpc_py enable_bdev_histogram aio0 -d
wait $bdev_perf_pid
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w unmap -t 1
sync