Skip to content

Commit

Permalink
rados: Add cleanup message with time to rados bench output
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/15704

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
  • Loading branch information
vumrao committed May 9, 2016
1 parent 646a6a2 commit 885ebb1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/common/obj_bencher.cc
Expand Up @@ -226,6 +226,7 @@ int ObjBencher::aio_bench(
int num_objects = 0;
int r = 0;
int prevPid = 0;
utime_t runtime;

// default metadata object is used if user does not specify one
const std::string run_name_meta = (run_name.empty() ? BENCH_LASTRUN_METADATA : run_name);
Expand Down Expand Up @@ -286,9 +287,15 @@ int ObjBencher::aio_bench(
goto out;
}

data.start_time = ceph_clock_now(cct);
out(cout) << "Cleaning up (deleting benchmark objects)" << std::endl;

r = clean_up(num_objects, prevPid, concurrentios);
if (r != 0) goto out;

runtime = ceph_clock_now(cct) - data.start_time;
out(cout) << "Clean up completed and total clean up time :" << runtime << std::endl;

// lastrun file
r = sync_remove(run_name_meta);
if (r != 0) goto out;
Expand Down

0 comments on commit 885ebb1

Please sign in to comment.