Giter VIP home page Giter VIP logo

Comments (3)

findstr avatar findstr commented on August 17, 2024
  1. 递归确实不兼容,但是其实是处理了的,如果start和stop不是成对出现,其实是会报错的。
  2. 为了简化实现,并没有支持递归。如果要测试递归只要把profiler范围放在最开始调用此函数处即可。
  3. 有使用该库,但他毕竟只是一个性能分析器,正常的代码不会一直挂着性能分析器,你说呢。

from silly.

linxiaolong avatar linxiaolong commented on August 17, 2024

嗯,我这边需求是想所有函数都有所监控,看了下你代码发现应该是需要手动设置监测范围。

from silly.

findstr avatar findstr commented on August 17, 2024

我第一版是可以的,后来觉得监控信息太多就重写了.

一个简单满足你需求的办法是,使用lua的debug库,hook函数的进入与退出。在进入时调用profiler.start退出时调用profiler.stop,然后修改一下profiler使其支持多次start,或者还可以直接在hook层过滤掉递归调用。

from silly.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.