Configurable metrics max batch size
This commit is contained in:
parent
84e5896299
commit
53a6b0fd3b
7 changed files with 28 additions and 2 deletions
|
|
@ -30,6 +30,18 @@ describe("Monitor", function()
|
|||
package.loaded["monitor"] = nil
|
||||
end)
|
||||
|
||||
it("extended batch size", function()
|
||||
local monitor = require("monitor")
|
||||
mock_ngx({ var = {} })
|
||||
monitor.set_metrics_max_batch_size(20000)
|
||||
|
||||
for i = 1,20000,1 do
|
||||
monitor.call()
|
||||
end
|
||||
|
||||
assert.equal(20000, #monitor.get_metrics_batch())
|
||||
end)
|
||||
|
||||
it("batches metrics", function()
|
||||
local monitor = require("monitor")
|
||||
mock_ngx({ var = {} })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue