Comments (3)
- 递归确实不兼容,但是其实是处理了的,如果start和stop不是成对出现,其实是会报错的。
- 为了简化实现,并没有支持递归。如果要测试递归只要把profiler范围放在最开始调用此函数处即可。
- 有使用该库,但他毕竟只是一个性能分析器,正常的代码不会一直挂着性能分析器,你说呢。
from silly.
嗯,我这边需求是想所有函数都有所监控,看了下你代码发现应该是需要手动设置监测范围。
from silly.
我第一版是可以的,后来觉得监控信息太多就重写了.
一个简单满足你需求的办法是,使用lua的debug库,hook函数的进入与退出。在进入时调用profiler.start退出时调用profiler.stop,然后修改一下profiler使其支持多次start,或者还可以直接在hook层过滤掉递归调用。
from silly.
Related Issues (5)
- 非常棒的一个网络库
- 偶现server接收不到数据 HOT 3
- silly_socket_init初始化bug HOT 3
- base64encode有bug HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from silly.