aboutsummaryrefslogtreecommitdiffstats
path: root/util/statistics.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-05-06 19:21:29 +0100
committerMatthew Wild <mwild1@gmail.com>2015-05-06 19:21:29 +0100
commitec83b2aa91ab9142ad6e7f4d26b0f6d20853e747 (patch)
treeac1899833b30b87ea97439f061e9b892bd188367 /util/statistics.lua
parent150799952b2bb969b2cea28c48f52b9ccad13b2b (diff)
parentd67ec1537ba3d0e41615f43c0afe13828ecc002e (diff)
downloadprosody-ec83b2aa91ab9142ad6e7f4d26b0f6d20853e747.tar.gz
prosody-ec83b2aa91ab9142ad6e7f4d26b0f6d20853e747.zip
Merge
Diffstat (limited to 'util/statistics.lua')
-rw-r--r--util/statistics.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/statistics.lua b/util/statistics.lua
index a05a1f91..26355026 100644
--- a/util/statistics.lua
+++ b/util/statistics.lua
@@ -88,7 +88,7 @@ local function new_registry(config)
return function (value)
n_actual_events = n_actual_events + 1;
- if n_actual_events%duration_sample_interval > 0 then
+ if n_actual_events%duration_sample_interval == 1 then
last_event = (last_event%duration_max_samples) + 1;
events[last_event] = value;
end
@@ -113,7 +113,7 @@ local function new_registry(config)
return function ()
n_actual_events = n_actual_events + 1;
- if n_actual_events%duration_sample_interval > 0 then
+ if n_actual_events%duration_sample_interval ~= 1 then
return nop_function;
end