arthas的简单使用

性能分析案例一些使用方法技巧

  • 先用thread -n 10 找出线程堆栈中程序运行的类与方法

  • Thread –b 检测是否有线程锁

  • 接着sc -d com.poizon.infr.user.core.service.util.HttpUtil.doHttpPost,查找类

  • 然后 sm -d com.poizon.infr.user.core.service.util.HttpUtil包下的方法

  • 再然后trace com.poizon.infr.user.core.service.util.HttpUtil doHttpPost  '#cost > 10'方法耗时

  • trace com.poizon.infr.user.core.service.controller.UnionLoginController unionLogin  '#cost > 50' -n 3

  • jad --source-only com.poizon.infr.user.core.service.util.HttpUtil.doHttpPost ,反编译出怀疑的源代码进行分析

  • profiler -e cpu -d 300 --format svg start 火焰图

 

【注解&参考】

  [参考-1] https://arthas.aliyun.com/doc/

posted @ 2021-11-05 15:04  up~up  阅读(72)  评论(0)    收藏  举报