mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
add skynet command MQLEN for debug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user