From: Samuel Just Date: Fri, 15 Aug 2025 22:58:32 +0000 (-0700) Subject: crimson/.../store-bench: clean up results_t X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f71f911fbcbab1af593b61815493c852c91c6faa;p=ceph.git crimson/.../store-bench: clean up results_t - simplify the formatter keys - use unsigned for number of ios - better names Signed-off-by: Samuel Just --- diff --git a/src/crimson/tools/store_bench/store-bench.cc b/src/crimson/tools/store_bench/store-bench.cc index b8d48bdc33f..90db1bdd911 100644 --- a/src/crimson/tools/store_bench/store-bench.cc +++ b/src/crimson/tools/store_bench/store-bench.cc @@ -61,24 +61,25 @@ SET_SUBSYS(osd); * num_operations by 1 Each delete increases the number of operations by 1 */ struct results_t { - int num_operations = 0; - std::chrono::duration tot_latency_sec = 0s; + uint64_t ios_completed = 0; + std::chrono::duration total_latency = 0s; std::chrono::duration duration = 0s; results_t &operator += (const results_t &other_result) { - num_operations += other_result.num_operations; - tot_latency_sec += other_result.tot_latency_sec; + ios_completed += other_result.ios_completed; + total_latency += other_result.total_latency; return *this; } void dump(ceph::Formatter *f) const { f->open_object_section("results_t"); - f->dump_int("number of operations done", num_operations); + f->dump_int("ios_completed", ios_completed); f->dump_float( - "the total latency aka time for these operations", - tot_latency_sec.count()); - f->dump_float("the time the workload took to run is ", - duration.count()); + "total_latency_s", + total_latency.count()); + f->dump_float( + "total_duration_s", + duration.count()); f->close_section(); } }; @@ -309,7 +310,7 @@ seastar::future<> PGLogWorkload::run( * takes to add and remove each key */ auto add_remove_entry = [&]() -> seastar::future { - int num_ops = 0; + uint64_t num_ops = 0; std::chrono::duration tot_latency = std::chrono::duration(0.0); auto start = ceph::mono_clock::now();