mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
debug command reload and timing removed
This commit is contained in:
@@ -19,18 +19,6 @@ function command.LIST()
|
|||||||
return list
|
return list
|
||||||
end
|
end
|
||||||
|
|
||||||
function command.RELOAD(handle)
|
|
||||||
handle = handle_to_address(handle)
|
|
||||||
local cmd = string.match(services[handle], "snlua (.+)")
|
|
||||||
print(services[handle],cmd)
|
|
||||||
if cmd then
|
|
||||||
skynet.send(handle,"debug","RELOAD",cmd)
|
|
||||||
return {cmd}
|
|
||||||
else
|
|
||||||
return {"Support only snlua"}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function command.STAT()
|
function command.STAT()
|
||||||
local list = {}
|
local list = {}
|
||||||
for k,v in pairs(services) do
|
for k,v in pairs(services) do
|
||||||
@@ -50,22 +38,6 @@ function command.INFO(handle)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function command.TIMING(handle)
|
|
||||||
handle = handle_to_address(handle)
|
|
||||||
if services[handle] == nil then
|
|
||||||
return
|
|
||||||
else
|
|
||||||
local r = skynet.call(handle,"debug","TIMING")
|
|
||||||
local result = {}
|
|
||||||
for k,v in pairs(r) do
|
|
||||||
v.name = services[k]
|
|
||||||
v.avg = v.ti/v.n
|
|
||||||
result[skynet.address(k)] = v
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function command.KILL(handle)
|
function command.KILL(handle)
|
||||||
handle = handle_to_address(handle)
|
handle = handle_to_address(handle)
|
||||||
skynet.kill(handle)
|
skynet.kill(handle)
|
||||||
|
|||||||
Reference in New Issue
Block a user