From: Loic Dachary Date: Thu, 9 Apr 2015 01:31:21 +0000 (+0200) Subject: common: rados bench data.finished = 0 X-Git-Tag: v9.0.2~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5c6190d012785222ba1eebee734aa34f79c5bf27;p=ceph.git common: rados bench data.finished = 0 ObjBencher::aio_bench sets data.finished to num_objs but it should be set to zero since it reflects the number of objects read / written. That's what the read bench do and the write bench should do the same. It does not cause a problem, it is just confusing. Signed-off-by: Loic Dachary --- diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index c877e127eb08..547b753649ed 100644 --- a/src/common/obj_bencher.cc +++ b/src/common/obj_bencher.cc @@ -198,7 +198,7 @@ int ObjBencher::aio_bench( data.object_size = object_size; data.in_flight = 0; data.started = 0; - data.finished = num_objects; + data.finished = 0; data.min_latency = 9999.0; // this better be higher than initial latency! data.max_latency = 0; data.avg_latency = 0; @@ -342,6 +342,7 @@ int ObjBencher::write_bench(int secondsToRun, pthread_create(&print_thread, NULL, ObjBencher::status_printer, (void *)this); lock.Lock(); + data.finished = 0; data.start_time = ceph_clock_now(cct); lock.Unlock(); for (int i = 0; i