From: Piotr Dałek Date: Thu, 10 Mar 2016 11:48:49 +0000 (+0100) Subject: common/obj_bencher.cc: bump the precision of bandwidth field X-Git-Tag: v10.1.0~170^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8021%2Fhead;p=ceph.git common/obj_bencher.cc: bump the precision of bandwidth field 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 --- diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index 28f4ffc48eb..9a2215e4616 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