add profile module, and use it in snax

This commit is contained in:
Cloud Wu
2014-04-22 18:27:41 +08:00
parent 387b95026d
commit 960bd23c56
5 changed files with 243 additions and 5 deletions

View File

@@ -6,6 +6,11 @@ local assert = assert
local pairs = pairs
local pcall = pcall
local profile = require "profile"
coroutine.resume = profile.resume
coroutine.yield = profile.yield
local proto = {}
local skynet = {
-- read skynet.h
@@ -476,6 +481,12 @@ end
----- debug
local internal_info_func
function skynet.info_func(func)
internal_info_func = func
end
local dbgcmd = {}
function dbgcmd.MEM()