You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xiaojin 2f33762a6b 🐳chore(库): 调整目录名 5 years ago
..
Makefile 🐳chore(库): 调整目录名 5 years ago
README.md 🐳chore(库): 调整目录名 5 years ago
icallpath.c 🐳chore(库): 调整目录名 5 years ago
icallpath.h 🐳chore(库): 调整目录名 5 years ago
imap.c 🐳chore(库): 调整目录名 5 years ago
imap.h 🐳chore(库): 调整目录名 5 years ago
profile.c 🐳chore(库): 调整目录名 5 years ago
profile.h 🐳chore(库): 调整目录名 5 years ago
rdtsc.h 🐳chore(库): 调整目录名 5 years ago

README.md

lua profile lib

profile c and lua fucntion and support coroutine yield.

local profile = require "profile"

profile.start()

-- your code 

profile.dstop(32) -- dump top 32 call info
-- output example
--[[ 

------- dump profile -------
[1] userdata: 0x7fc7e0c09990 name:loop file:[L]@test.lua:48 count:3 total:0.272042s ave:0.090681s percent:55.05%
[2] userdata: 0x7fc7e0c09970 name:call_func file:[L]@test.lua:37 count:3000000 total:0.222086s ave:0.000000s percent:44.95%
[3] userdata: 0x7fc7e0c099e0 name:foo2 file:[L]@test.lua:62 count:1 total:0.000000s ave:0.000000s percent:0%
[4] userdata: 0x7fc7e0c09a30 name:foo file:[L]@test.lua:68 count:1 total:0.000000s ave:0.000000s percent:0%

]]