From 5e1fced0c3744e527ef4ad22468382af5b1e332c Mon Sep 17 00:00:00 2001 From: Diego Pino Garcia Date: Fri, 1 Jun 2018 12:07:07 +0000 Subject: [PATCH] Fix aggregated counter retrieval --- src/lib/ptree/ptree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ptree/ptree.lua b/src/lib/ptree/ptree.lua index b012603dc8..51ee8ac433 100644 --- a/src/lib/ptree/ptree.lua +++ b/src/lib/ptree/ptree.lua @@ -335,7 +335,7 @@ end -- accumulative sum. Accumulative sum is initialized to aggregated counter -- value if any. local function compute_aggregated_value (k) - local ret = counters.archived[k] or 0 + local ret = counters.archived[k][0] or 0 for _,c in pairs(counters.active[k]) do ret = ret + counter.read(c) end