From 7a461a43adf2df1fd947dc50bd6fa274577fd63d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Thu, 10 Mar 2016 12:48:49 +0100 Subject: [PATCH] common/obj_bencher.cc: bump the precision of bandwidth field MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When calculated final average bandwidth exceeds 999MB, it starts to get printed in scientific notation. Bump up the bandwidth field precision so it'll remain in floating-point format for a bit longer. Signed-off-by: Piotr Dałek --- src/common/obj_bencher.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index 28f4ffc48ebf6..9a2215e46162d 100644 --- a/src/common/obj_bencher.cc +++ b/src/common/obj_bencher.cc @@ -568,7 +568,7 @@ int ObjBencher::write_bench(int secondsToRun, << "Total writes made: " << data.finished << std::endl << "Write size: " << data.op_size << std::endl << "Object size: " << data.object_size << std::endl - << "Bandwidth (MB/sec): " << setprecision(3) << bandwidth << std::endl + << "Bandwidth (MB/sec): " << setprecision(6) << bandwidth << std::endl << "Stddev Bandwidth: " << vec_stddev(data.history.bandwidth) << std::endl << "Max bandwidth (MB/sec): " << data.idata.max_bandwidth << std::endl << "Min bandwidth (MB/sec): " << data.idata.min_bandwidth << std::endl @@ -817,7 +817,7 @@ int ObjBencher::seq_read_bench(int seconds_to_run, int num_objects, int concurre << "Total reads made: " << data.finished << std::endl << "Read size: " << data.op_size << std::endl << "Object size: " << data.object_size << std::endl - << "Bandwidth (MB/sec): " << setprecision(3) << bandwidth << std::endl + << "Bandwidth (MB/sec): " << setprecision(6) << bandwidth << std::endl << "Average IOPS " << (int)(data.finished/runtime) << std::endl << "Stddev IOPS: " << vec_stddev(data.history.iops) << std::endl << "Max IOPS: " << data.idata.max_iops << std::endl @@ -1050,7 +1050,7 @@ int ObjBencher::rand_read_bench(int seconds_to_run, int num_objects, int concurr << "Total reads made: " << data.finished << std::endl << "Read size: " << data.op_size << std::endl << "Object size: " << data.object_size << std::endl - << "Bandwidth (MB/sec): " << setprecision(3) << bandwidth << std::endl + << "Bandwidth (MB/sec): " << setprecision(6) << bandwidth << std::endl << "Average IOPS: " << (int)(data.finished/runtime) << std::endl << "Stddev IOPS: " << vec_stddev(data.history.iops) << std::endl << "Max IOPS: " << data.idata.max_iops << std::endl -- 2.39.5