美文网首页
1、 Arthas 学习

1、 Arthas 学习

作者: 愿远方有你 | 来源:发表于2022-03-12 22:31 被阅读0次

启动arthas

sc 查找全限定名

sc *xxx

trace 方法耗时分析

trace com.xxx.xxx.MyClass myMthod
增加条件耗时过滤 trace demo.MathGame run '#cost > 10'
打印jdk 耗时 trace --skipJDKMethod false demo.MathGame run

image.png

watch

watch com.xxx.xx.MyClass myMethod "{params,target,returnObj}" -x 2
耗时过滤 watch demo.MathGame primeFactors '{params, returnObj}' '#cost>200' -x 2
入参过滤 watch demo.MathGame primeFactors "{params[0],target}" "params[0]<0"

image.png

https://arthas.aliyun.com/doc/

相关文章

网友评论

      本文标题:1、 Arthas 学习

      本文链接:https://www.haomeiwen.com/subject/eauldrtx.html