From: Loic Dachary Date: Thu, 9 Apr 2015 01:26:57 +0000 (+0200) Subject: common: remove unused maxObjectsToCreate X-Git-Tag: v9.0.2~165^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ac727982213bf676beefe9340d6822193dbb700;p=ceph.git common: remove unused maxObjectsToCreate Signed-off-by: Loic Dachary --- diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index 45a58ee00e55..c877e127eb08 100644 --- a/src/common/obj_bencher.cc +++ b/src/common/obj_bencher.cc @@ -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; diff --git a/src/common/obj_bencher.h b/src/common/obj_bencher.h index b384dad905c1..c67d4292d2ab 100644 --- a/src/common/obj_bencher.h +++ b/src/common/obj_bencher.h @@ -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); diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 50140659535d..8e0caed0acb1 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -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;