Skip to content

Commit

Permalink
hack around pack/unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
naturefreshmilk committed Feb 4, 2020
1 parent 94b066a commit aa19297
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions monitoring/metrictypes/counter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ monitoring.counter = function(name, help)
local t0 = minetest.get_us_time()

reentry_map[metric.name] = true
local result1, result2, result3 = f(...)
-- TODO: find out how to do this properly (pack, unpack)
local r1, r2, r3, r4, r5, r6 = f(...)
reentry_map[metric.name] = nil

local t1 = minetest.get_us_time()
local diff = t1 - t0

metric.value = metric.value + diff

return result1, result2, result3
return r1, r2, r3, r4, r5, r6
end
end
}
Expand Down

0 comments on commit aa19297

Please sign in to comment.