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;
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) {
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();
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;
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);
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);
}
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;