GithubHelp home page GithubHelp logo

ez8-co / ezpp Goto Github PK

View Code? Open in Web Editor NEW
30.0 5.0 7.0 46 KB

🔍 C++性能剖析器(跨平台、无锁、智能) Easy Performance Profiler that is cross-platform, lock-free and smart for C++.

License: MIT License

C++ 94.63% CMake 5.37%
performance-profiling cross-platform cpp header-only lock-free coroutine

ezpp's Introduction

ezpp

license Build Status Build status

  • C++性能剖析器(跨平台、无锁、智能)
  • Easy Performance Profiler that is cross-platform, lock-free and smart for C++.

性能优化的几个层次

原则:基于真实的度量。(《重构——改善现有代码的设计》P69 哪怕你完全了解系统,也请实际度量它的性能,不要臆测。臆测会让你学到一些东西,但十有八九你是错的。)

  • 第一个层次是语法层面,要基础扎实,《Efficient C++》、《More Efficient C++》、《Effective C++》、《More Effective C++》熟读于心,不要在语法上产生不必要的性能损耗,回头再来改,成本就大了,比如迭代器前++、RVO/NRVO、内联、避免多余拷贝等等。
  • 第二个层次是常规的算法改进、流程优化等等,比如加位图、树改HASH、递归改循环、分支预测、缓存行、并行、异步、批量等等。
  • 第三个层次是架构层面的改进,直接去除不必要的流程、模块等等,毕竟没有比不存在的东西性能更快的了。
  • 第四个层次是直接加机器(scale-out)或者升级机器配置(scale-up),人力成本可能要比机器贵很多,而很多机器实际是空闲的,没必要去为了扣性能重构现有已经稳定运行的系统,容易引入风险(这条看业务场景,公有云、互联网业务适用,嵌入式、私有云、依赖低成本机器资源的业务不适用)。

TODO

  • 🔥 智能性能分析
    • 🔥 递归调用提示
    • 🔥 热点调用标记
    • 🔥 细分建议
  • 🔥 树形调用链
  • 🔥 支持在线剖析(golang pprof的http / 管道ipc)
  • 🔥 耗时火焰图(golang pprof)
  • 🔥 支持协程
  • 耗时百分比
  • 其他优化

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.