obj_bencher: check run_name and prefix for empty string instead of NULL
change aio_bench and clean_up parameter const char * to const std::string & format.
In rest_bench.cc, aio_bench used run_name.c_str(), so this format will always be empty
string not NULL, so the condition statement
const std::string run_name_meta = (run_name == NULL ? BENCH_LASTRUN_METADATA : std::string(run_name));
is wrong!
test fix:
before:
./rest-bench --seconds 1 -t 2 -b 100 write --api-host=radosgw.com --bucket=test_rm --access-key=FTL7TSJAGXX5KKDQHMJM --secret=
123456879
use s3cmd ls s3://test_rm , we can a lot of objects in this bucket, objects are not cleaned up.
after changes, do the same procedure, objects are cleaned up.
Signed-off-by: shawn chen <cxwshawn@gmail.com>