]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/obj_bencher: set {min,max}_iops if runtime < 1 sec 17182/head
authorKefu Chai <kchai@redhat.com>
Wed, 23 Aug 2017 07:31:32 +0000 (15:31 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 23 Aug 2017 07:31:32 +0000 (15:31 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/obj_bencher.cc

index 411dac3dd9d6a2637e38eab0cc320cc1c054bfcd..87c37c5bfc68ea05c29e1f1b63b9884deae7b9e2 100644 (file)
@@ -202,6 +202,10 @@ void *ObjBencher::status_printer(void *_bencher) {
   }
   if (formatter)
     formatter->close_section(); //datas
+  if (iops < 0) {
+    auto runtime = ceph_clock_now() - data.start_time;
+    data.idata.min_iops = data.idata.max_iops = data.finished / runtime;
+  }
   bencher->lock.Unlock();
   return NULL;
 }