From: Matan Breizman Date: Thu, 4 Jun 2026 09:39:11 +0000 (+0000) Subject: crimson/os/seastore: switch op_lat sample_sum from ms to us X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=18562abadef0bf64d7a106c5a3ec540127c60e87;p=ceph.git crimson/os/seastore: switch op_lat sample_sum from ms to us Sub-ms ops rounded to zero under the old millisecond cast, making the average meaningless for fast NVMe workloads. sample_sum is now in microseconds; divide by 1000 for ms average. Signed-off-by: Matan Breizman --- diff --git a/src/crimson/os/seastore/seastore.h b/src/crimson/os/seastore/seastore.h index eae23b4525a..54dd67c783f 100644 --- a/src/crimson/os/seastore/seastore.h +++ b/src/crimson/os/seastore/seastore.h @@ -451,11 +451,12 @@ public: void add_latency_sample(op_type_t op_type, std::chrono::steady_clock::duration dur) { seastar::metrics::histogram& lat = get_latency(op_type); + auto us = std::chrono::duration_cast(dur).count(); lat.sample_count++; - lat.sample_sum += std::chrono::duration_cast(dur).count(); + lat.sample_sum += us; bool found = false; for (auto& b : lat.buckets) { - if (static_cast(std::chrono::duration_cast(dur).count()) <= b.upper_bound) { + if (static_cast(us) <= b.upper_bound) { ++b.count; found = true; break;