From c7a9b385b42ce108a794210a3195ff53eb87561a Mon Sep 17 00:00:00 2001 From: PCzhangPC Date: Mon, 16 Oct 2017 21:26:17 +0800 Subject: [PATCH] rbd:show read:write proportion in the infomation of readwrite bench test Signed-off-by: PCzhangPC --- src/tools/rbd/action/Bench.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/rbd/action/Bench.cc b/src/tools/rbd/action/Bench.cc index 2ff851e172a83..8e15a7dcf73e0 100644 --- a/src/tools/rbd/action/Bench.cc +++ b/src/tools/rbd/action/Bench.cc @@ -212,6 +212,8 @@ int do_bench(librbd::Image& image, io_type_t io_type, std::cout << "bench " << " type " << (io_type == IO_TYPE_READ ? "read" : io_type == IO_TYPE_WRITE ? "write" : "readwrite") + << (io_type == IO_TYPE_RW ? " read:write=" + + to_string(read_proportion) + ":" + to_string(100 - read_proportion) : "") << " io_size " << io_size << " io_threads " << io_threads << " bytes " << io_bytes -- 2.39.5