arthas分析接口耗时

1 登陆服务器,安装arthas
 wget https://alibaba.github.io/arthas/arthas-boot.jar

 

2 启动arthas

  java -jar arthas-boot.jar

 

3 选择检测线程,回车

 

arthas分析接口耗时

4 监听具体方法

trace <类的包全名> <检测方法>


example: trace com.xueqiu.service.xqtong.SurveyUserService queryNonSurveyUserInfo  

 

5 触发方法执行,可通过swagger或postman等工具触发方法,即可显示整条链路具体执行时间,最耗时代码会标记红色

 

arthas分析接口耗时