1、 Arthas 学习

2022-03-12  本文已影响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/

上一篇 下一篇

猜你喜欢

热点阅读