ruby-prof
来源:互联网 发布:集体智慧编程 pdf 编辑:程序博客网 时间:2024/06/08 15:24
ruby-prof
ruby-prof是比较强大的,支持cpu,内存使用,对象分配等等的性能分析,而且提供了很多友好的输出格式,不仅仅是有基于文字,html的格式,还能输出graphviz格式的dot文件。
require 'ruby-prof'RubyProf.start# 这里写入要进行性能剖析的代码result = RubyProf.stop# 选择一个Printerprinter = RubyProf::FlatPrinter.new(result)printer.print(STDOUT)
#代码示例require 'ruby-prof'def perf_test if params[:__t] RubyProf.start yield result = RubyProf.stop printer = RubyProf::GraphPrinter.new(result) printer else yield endenddef hi 100_000.times { }enddef hello 10_000.times { }endRubyProf.starthihelloresult = RubyProf.stopprinter = RubyProf::GraphPrinter.new(result)printer.print(STDOUT, {})
参考链接 https://ruby-china.org/topics/25959
GitHub链接 https://github.com/ruby-prof/ruby-prof
阅读全文
0 0
- ruby-prof
- Ruby Profiler详解之ruby-prof(I)
- prof. Phillip Allen
- Prof-UIS 2.50
- Prof-UIS使用总结
- Prof-UIS学习
- Prof-UIS初探
- Prof-UIS学习资源
- Prof分析工具
- Prof UIS相关
- Meeting with Prof. Marwan
- Adobe Acrobat DC Prof
- Prof-UIS程序做界面.
- ruby
- ruby
- ruby
- Ruby
- Ruby
- notepad++ 的c11,c++11环境设置
- 宏电GPRS DTU H7210调试报告(参数配置)
- SPI学习(二)----有图有真相
- 网络安全传输系统(1)-功能介绍
- 新建工程时遇到——Problem Opening Wizard
- ruby-prof
- etcd:从应用场景到实现原理的全方位解读
- ZOJ 3822 Domination【概率dp】
- LINUX fork的使用
- solr部署
- 安装GCC-4.6.1详细教程
- CAD二次开发(C#)第一个例子
- Android 学习整理(一)
- Hdu 2222 . Keywords Search