add skynet command MQLEN for debug

This commit is contained in:
云风
2014-02-21 15:03:20 +08:00
parent 5aeba52bf9
commit 69e179a52e
4 changed files with 27 additions and 0 deletions

View File

@@ -526,6 +526,7 @@ function dbgcmd.STAT()
query_state(stat, "count")
query_state(stat, "time")
stat.boottime = debug.getregistry().skynet_boottime
stat.mqlen = skynet.mqlen()
skynet.ret(skynet.pack(stat))
end
@@ -692,4 +693,8 @@ function skynet.monitor(service, query)
c.command("MONITOR", string.format(":%08x", monitor))
end
function skynet.mqlen()
return tonumber(c.command "MQLEN")
end
return skynet