mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 11:33:09 +00:00
use new way for stat
This commit is contained in:
@@ -21,11 +21,7 @@ function command.STAT()
|
||||
local list = {}
|
||||
for k,v in pairs(services) do
|
||||
local stat = skynet.call(k,"debug","STAT")
|
||||
local result = {}
|
||||
for k,v in pairs(stat) do
|
||||
table.insert(result, string.format("%s = %s", k, tostring(v)))
|
||||
end
|
||||
list[skynet.address(k)] = table.concat(result,",") .. " (" .. v .. ")"
|
||||
list[skynet.address(k)] = stat
|
||||
end
|
||||
skynet.ret(skynet.pack(list))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user