perf-tools 简单试用

南笙酒味 提交于 2019-12-06 06:30:12

per-tools 是性能优化大师brendan gregg 就有perf 以及ftrace 编写的性能优化工具集
提供了io 、网络、系统调用。。。大部分方面的性能分析工具。

一张参考图

 

 

安装

  • clone 代码
 
git clone --depth 1 https://github.com/brendangregg/perf-tools
  • 基本使用
    查看io 延迟
 
./iolatency -Q

效果

 ./iolatency -Q
Tracing block I/O. Output every 1 seconds. Ctrl-C to end.
  >=(ms) .. <(ms) : I/O |Distribution |
       0 -> 1 : 0 | |
       1 -> 2 : 0 | |
       2 -> 4 : 0 | |
       4 -> 8 : 0 | |
       8 -> 16 : 2 |######################################|
  >=(ms) .. <(ms) : I/O |Distribution |
       0 -> 1 : 0 | |
  >=(ms) .. <(ms) : I/O |Distribution |
       0 -> 1 : 0 | |
  >=(ms) .. <(ms) : I/O |Distribution |
       0 -> 1 : 0 | |
^C
 

说明

perf-tools 使用简单,同时github 上也提供了比较全的demo,可以方便学习

参考资料

https://github.com/brendangregg/perf-tools

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!