From: Danny Al-Gaaf Date: Tue, 7 May 2013 15:19:36 +0000 (+0200) Subject: common/obj_bencher.cc: reduce scope of avg_bandwidth X-Git-Tag: v0.63~46^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8c97e77e57694b0864d4f91de412be15bc270a1b;p=ceph.git common/obj_bencher.cc: reduce scope of avg_bandwidth Signed-off-by: Danny Al-Gaaf --- diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index 07a954e3d38c..7444d687c8ee 100644 --- a/src/common/obj_bencher.cc +++ b/src/common/obj_bencher.cc @@ -90,7 +90,6 @@ void *ObjBencher::status_printer(void *_bencher) { int i = 0; int previous_writes = 0; int cycleSinceChange = 0; - double avg_bandwidth; double bandwidth; utime_t ONE_SECOND; ONE_SECOND.set_from_double(1.0); @@ -131,7 +130,7 @@ void *ObjBencher::status_printer(void *_bencher) { data.history.bandwidth.push_back(bandwidth); } - avg_bandwidth = (double) (data.trans_size) * (data.finished) + double avg_bandwidth = (double) (data.trans_size) * (data.finished) / (double)(cur_time - data.start_time) / (1024*1024); if (previous_writes != data.finished) { previous_writes = data.finished;