aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/statistics.lua2
-rw-r--r--util/statsd.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/util/statistics.lua b/util/statistics.lua
index b76a7385..cb6481c5 100644
--- a/util/statistics.lua
+++ b/util/statistics.lua
@@ -102,7 +102,7 @@ end
function histogram_metric_mt:sample(value)
-- According to the I-D, values must be part of all buckets
for i, bucket in pairs(self) do
- if "number" == type(i) and bucket.threshold >= value then
+ if "number" == type(i) and value <= bucket.threshold then
bucket.count = bucket.count + 1
end
end
diff --git a/util/statsd.lua b/util/statsd.lua
index b91e2a79..6ae85c31 100644
--- a/util/statsd.lua
+++ b/util/statsd.lua
@@ -115,7 +115,7 @@ end
function histogram_metric_mt:sample(value)
-- According to the I-D, values must be part of all buckets
for i, bucket in pairs(self) do
- if "number" == type(i) and bucket.threshold >= value then
+ if "number" == type(i) and value <= bucket.threshold then
bucket.count = bucket.count + 1
self._impl:push_counter_delta(bucket._full_name, 1)
end