]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: rados bench data.finished = 0 4308/head
authorLoic Dachary <ldachary@redhat.com>
Thu, 9 Apr 2015 01:31:21 +0000 (03:31 +0200)
committerLoic Dachary <ldachary@redhat.com>
Thu, 7 May 2015 12:08:46 +0000 (14:08 +0200)
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 <ldachary@redhat.com>
src/common/obj_bencher.cc

index c877e127eb088c2e688057c7a0ee2fddd25ee265..547b753649ed9e5382c15e8d0ce3682d2c828fb8 100644 (file)
@@ -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<concurrentios; ++i) {