]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
obj_bencher: remove 'trans_size' as obsolete
authorDmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Mon, 30 Mar 2015 22:13:38 +0000 (15:13 -0700)
committerDmitry Yatsushkevich <dmitry.yatsushkevich@gmail.com>
Tue, 5 May 2015 21:50:01 +0000 (14:50 -0700)
'trans_size' description from header: "size of the write/read to perform"
But really 'object_size' is used in write/read operations. 'trans_size' is used
only in ObjBencher::status_printer for calc current and average bandwidth.
As result - bad statistics in case 'trans_size' and and 'object_size' are different.

Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
src/common/obj_bencher.cc
src/common/obj_bencher.h

index f2e4bac4fff2580891836439ab6a4337d4080c82..9d132e59c0e95f10c1786f44f317c45a03f77bb5 100644 (file)
@@ -103,7 +103,7 @@ void *ObjBencher::status_printer(void *_bencher) {
     }
     if (cycleSinceChange)
       bandwidth = (double)(data.finished - previous_writes)
-        * (data.trans_size)
+        * (data.object_size)
         / (1024*1024)
         / cycleSinceChange;
     else
@@ -133,7 +133,7 @@ void *ObjBencher::status_printer(void *_bencher) {
       data.history.iops.push_back(iops);
     }
 
-    double avg_bandwidth = (double) (data.trans_size) * (data.finished)
+    double avg_bandwidth = (double) (data.object_size) * (data.finished)
       / (double)(cur_time - data.start_time) / (1024*1024);
     if (previous_writes != data.finished) {
       previous_writes = data.finished;
@@ -199,7 +199,6 @@ int ObjBencher::aio_bench(
   lock.Lock();
   data.done = false;
   data.object_size = object_size;
-  data.trans_size = op_size;
   data.in_flight = 0;
   data.started = 0;
   data.finished = num_objects;
index d650a05cbcbdd88d04186967952d052054b1a8ce..b384dad905c1684e0f5de4ba9c9080ce4c1b8ec3 100644 (file)
@@ -35,7 +35,6 @@ struct bench_history {
 struct bench_data {
   bool done; //is the benchmark is done
   int object_size; //the size of the objects
-  int trans_size; //size of the write/read to perform
   // same as object_size for write tests
   int in_flight; //number of reads/writes being waited on
   int started;