Skip to content

Commit

Permalink
th_nkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jul 19, 2024
1 parent 942cefc commit f09e1f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kong/dns/stats.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local tb_new = require(table.new)
local tb_new = require("table.new")
local tb_nkeys = require("table.nkeys")


local pairs = pairs
Expand Down Expand Up @@ -44,9 +45,10 @@ end


function _M:emit(fmt)
local output = {}
local stats = self.stats
local output = tb_new(0, tb_nkeys(stats))

for k, v in pairs(self.stats) do
for k, v in pairs(stats) do
output[fmt(k)] = v
end

Expand Down

0 comments on commit f09e1f9

Please sign in to comment.