mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
collectgarbage count change to lua 5.3
This commit is contained in:
@@ -14,8 +14,8 @@ local function init(skynet, export)
|
|||||||
dbgcmd = {}
|
dbgcmd = {}
|
||||||
|
|
||||||
function dbgcmd.MEM()
|
function dbgcmd.MEM()
|
||||||
local kb, bytes = collectgarbage "count"
|
local kb = collectgarbage "count"
|
||||||
skynet.ret(skynet.pack(kb,bytes))
|
skynet.ret(skynet.pack(kb))
|
||||||
end
|
end
|
||||||
|
|
||||||
function dbgcmd.GC()
|
function dbgcmd.GC()
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ end
|
|||||||
function command.MEM()
|
function command.MEM()
|
||||||
local list = {}
|
local list = {}
|
||||||
for k,v in pairs(services) do
|
for k,v in pairs(services) do
|
||||||
local ok, kb, bytes = pcall(skynet.call,k,"debug","MEM")
|
local ok, kb = pcall(skynet.call,k,"debug","MEM")
|
||||||
if not ok then
|
if not ok then
|
||||||
list[skynet.address(k)] = string.format("ERROR (%s)",v)
|
list[skynet.address(k)] = string.format("ERROR (%s)",v)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user