From 339de6b2181f3ea65614abac87eef7ecd4783e0f Mon Sep 17 00:00:00 2001 From: lisyarus Date: Tue, 3 Feb 2026 23:44:46 +0300 Subject: [PATCH] Handle negative values as zeroes in statistics log buckets --- libs/util/include/psemek/util/statistics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/util/include/psemek/util/statistics.hpp b/libs/util/include/psemek/util/statistics.hpp index 7a747f7a..701692d2 100644 --- a/libs/util/include/psemek/util/statistics.hpp +++ b/libs/util/include/psemek/util/statistics.hpp @@ -268,7 +268,7 @@ namespace psemek::util void statistics_log_bucket::push(T const & value, std::size_t count) { lite().push(value, count); - if (value == T{0}) [[unlikely]] + if (value <= T{0}) [[unlikely]] ++zero_count_; else {