]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: remove unused maxObjectsToCreate
authorLoic Dachary <ldachary@redhat.com>
Thu, 9 Apr 2015 01:26:57 +0000 (03:26 +0200)
committerLoic Dachary <ldachary@redhat.com>
Thu, 7 May 2015 12:08:46 +0000 (14:08 +0200)
Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/common/obj_bencher.cc
src/common/obj_bencher.h
src/tools/rados/rados.cc

index 45a58ee00e551f79ca3fa1f808aca417320ce8b9..c877e127eb088c2e688057c7a0ee2fddd25ee265 100644 (file)
@@ -170,7 +170,7 @@ void *ObjBencher::status_printer(void *_bencher) {
 int ObjBencher::aio_bench(
   int operation, int secondsToRun,
   int maxObjectsToCreate,
-  int concurrentios, int object_size, bool cleanup, const char* run_name) {
+  int concurrentios, int op_size, bool cleanup, const char* run_name) {
 
   if (concurrentios <= 0) 
     return -EINVAL;
@@ -211,7 +211,7 @@ int ObjBencher::aio_bench(
   sanitize_object_contents(&data, data.object_size);
 
   if (OP_WRITE == operation) {
-    r = write_bench(secondsToRun, maxObjectsToCreate, concurrentios, run_name_meta);
+    r = write_bench(secondsToRun, concurrentios, run_name_meta);
     if (r != 0) goto out;
   }
   else if (OP_SEQ_READ == operation) {
@@ -302,18 +302,15 @@ int ObjBencher::fetch_bench_metadata(const std::string& metadata_file, int* obje
   return 0;
 }
 
-int ObjBencher::write_bench(int secondsToRun, int maxObjectsToCreate,
-                            int concurrentios, const string& run_name_meta) {
-  if (concurrentios <= 0)
+int ObjBencher::write_bench(int secondsToRun,
+                           int concurrentios, const string& run_name_meta) {
+  if (concurrentios <= 0) 
     return -EINVAL;
 
-  if (maxObjectsToCreate > 0 && concurrentios > maxObjectsToCreate)
-    concurrentios = maxObjectsToCreate;
   out(cout) << "Maintaining " << concurrentios << " concurrent writes of "
-            << data.object_size << " bytes for up to "
-            << secondsToRun << " seconds or "
-            << maxObjectsToCreate << " objects"
-            << std::endl;
+           << data.object_size << " bytes for up to "
+           << secondsToRun << " seconds"
+           << std::endl;
   bufferlist* newContents = 0;
 
   std::string prefix = generate_object_prefix();
@@ -371,8 +368,7 @@ int ObjBencher::write_bench(int secondsToRun, int maxObjectsToCreate,
   stopTime = data.start_time + runtime;
   slot = 0;
   lock.Lock();
-  while( ceph_clock_now(cct) < stopTime &&
-         (!maxObjectsToCreate || data.started < maxObjectsToCreate)) {
+  while(ceph_clock_now(cct) < stopTime) {
     bool found = false;
     while (1) {
       int old_slot = slot;
index b384dad905c1684e0f5de4ba9c9080ce4c1b8ec3..c67d4292d2ab8e8f639f013d8459f5b3bc3ed798 100644 (file)
@@ -66,7 +66,7 @@ protected:
 
   int fetch_bench_metadata(const std::string& metadata_file, int* object_size, int* num_objects, int* prevPid);
 
-  int write_bench(int secondsToRun, int maxObjects, int concurrentios, const string& run_name_meta);
+  int write_bench(int secondsToRun, int concurrentios, const string& run_name_meta);
   int seq_read_bench(int secondsToRun, int num_objects, int concurrentios, int writePid);
   int rand_read_bench(int secondsToRun, int num_objects, int concurrentios, int writePid);
 
@@ -99,7 +99,7 @@ public:
   ObjBencher(CephContext *cct_) : show_time(false), cct(cct_), lock("ObjBencher::lock") {}
   virtual ~ObjBencher() {}
   int aio_bench(
-    int operation, int secondsToRun, int maxObjectsToCreate,
+    int operation, int secondsToRun,
     int concurrentios, int op_size, bool cleanup, const char* run_name);
   int clean_up(const char* prefix, int concurrentios, const char* run_name);
 
index 50140659535dbe6e90ab635b27a4b6192eac9edb..8e0caed0acb164b9e0d3748aee14e2b1abca8a38 100644 (file)
@@ -2270,7 +2270,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
     }
     RadosBencher bencher(g_ceph_context, rados, io_ctx);
     bencher.set_show_time(show_time);
-    ret = bencher.aio_bench(operation, seconds, num_objs,
+    ret = bencher.aio_bench(operation, seconds,
                            concurrent_ios, op_size, cleanup, run_name);
     if (ret != 0)
       cerr << "error during benchmark: " << ret << std::endl;