8000 GitHub - Patrick08T/LuaProfiler: a Lua profiler like perf which can export flame graph.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Patrick08T/LuaProfiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua Profiler

中文版教程

This tool d 6CF5 epends on cmake2.8+, lua5.3+ and FlameGraph

Please check your environment.

Theory

Like Perf, this tool can collect the function call stack in lua VM by frequency, and she can output a flamegraph.

Usage

install lua5.3.6

mkdir dep && cd dep
curl -R -O http://www.lua.org/ftp/lua-5.3.6.tar.gz
tar zxf lua-5.3.6.tar.gz
cd lua-5.3.6
make linux test
sudo make install
cd ../..

install FlameGraph

git clone https://github.com/Patrick08T/FlameGraph.git

build project

./build.sh

and then, you will get a libluaperf.so in ./bin/debug/ directory

Test

cp ./bin/debug/libluaperf.so ./
lua ./sample/sample.lua
./FlameGraph/flamegraph.pl samling.log > perf.svg

image

About

a Lua profiler like perf which can export flame graph.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0