From e8705ce8595e6103c4423875573eba5b44218a79 Mon Sep 17 00:00:00 2001 From: Adrian Tanase Date: Fri, 3 Apr 2026 11:47:38 +0300 Subject: [PATCH] fix: transaction and scenario time buckets --- src/metrics.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/metrics.rs b/src/metrics.rs index cfdab0c7..0bec8204 100644 --- a/src/metrics.rs +++ b/src/metrics.rs @@ -1141,9 +1141,9 @@ impl TransactionMetricAggregate { // Round to nearest 10 for times 100-500 ms. 101..=500 => ((time as f64 / 10.0).round() * 10.0) as usize, // Round to nearest 100 for times 500-1000 ms. - 501..=1000 => ((time as f64 / 100.0).round() * 10.0) as usize, + 501..=1000 => ((time as f64 / 100.0).round() * 100.0) as usize, // Round to nearest 1000 for larger times. - _ => ((time as f64 / 1000.0).round() * 10.0) as usize, + _ => ((time as f64 / 1000.0).round() * 1000.0) as usize, }; let counter = match self.times.get(&rounded_time) { @@ -1229,9 +1229,9 @@ impl ScenarioMetricAggregate { // Round to nearest 10 for times 100-500 ms. 101..=500 => ((time as f64 / 10.0).round() * 10.0) as usize, // Round to nearest 100 for times 500-1000 ms. - 501..=1000 => ((time as f64 / 100.0).round() * 10.0) as usize, + 501..=1000 => ((time as f64 / 100.0).round() * 100.0) as usize, // Round to nearest 1000 for larger times. - _ => ((time as f64 / 1000.0).round() * 10.0) as usize, + _ => ((time as f64 / 1000.0).round() * 1000.0) as usize, }; let counter = match self.times.get(&rounded_time) {