Arthas-guide.md
... ...
@@ -9,6 +9,64 @@
9 9
</p>
10 10
</div>
11 11
<div class="post-toc" id="toc">
12
+ <div>
13
+ <h3>常用命令,建议收藏</h3>
14
+
15
+```java
16
+1.查看耗时>200ms的方法的参数和返回值
17
+watch com.sie.snest.engine.model.property.SelectionProperty convertToRead '{params[0],params[3],returnObj}' '#cost>200' -n 100 -x 3
18
+
19
+
20
+2. 统计耗时
21
+trace com.sie.snest.engine.data.access.BussModelDataAccess search 'params[0].getModel().getName()=="equip_lubrication_calibration"' -n 100 --skipJDKMethod false
22
+
23
+trace com.sie.mbm.edo.calibration.models.Calibration periodUnitList -n 100 --skipJDKMethod false
24
+
25
+3.查看参数
26
+watch com.sie.mi.ioc.attribution.strategy.models.AttributionStrategy calcAttribution '{params,returnObj,throwExp}' -n 20 -x 3
27
+
28
+watch com.sie.mi.ioc.attribution.strategy.models.AttributionStrategy calcAttribution '{params,returnObj,throwExp}' 'params[0]=="04dkj8y9h3kny"' -n 20 -x 3
29
+
30
+4.其他示例
31
+
32
+watch com.sie.snest.engine.api.response.ResponseHandle beforeBodyWrite '{params,returnObj,throwExp}' -n 100 --skipJDKMethod false
33
+
34
+ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader '@com.sie.snest.engine.container.EngineContainer@getBussinessAppGroupContainer().getAppDataInfoMap().keySet()'
35
+
36
+
37
+ watch com.sie.snest
38
+trace com.sie.snest.engine.api.distributed.RpcInvocation invoke -n 5 --skipJDKMethod false
39
+
40
+trace com.sie.snest.engine.api.distributed.RpcInvocation invoke 'ModelMeta == "mbm_mes_process_match_rule"'
41
+
42
+stack com.sie.snest.engine.api.response.ResponseHandle beforeBodyWrite -n 20 --skipJDKMethod false
43
+
44
+
45
+trace org.springframework.web.servlet.DispatcherServlet doDispatch -n 20 --skipJDKMethod false
46
+
47
+
48
+watch com.sie.mi.ioc.attribution.strategy.models.AttributionStrategy calcAttribution '{params,returnObj.reportResult.candidateResult.dimList[0].dataList[0].reportData,throwExp}' 'params[0]=="04dkj8y9h3kny"' -n 20 -x 3
49
+
50
+watch com.sie.mi.ioc.attribution.strategy.models.AttributionStrategy calcAttribution '{params,returnObj,throwExp}' 'params[0]=="04dkj8y9h3kny"' -n 20 -x 3
51
+
52
+watch com.sie.snest.engine.api.RpcController service '{params,returnObj,throwExp}' -n 20 -x 3
53
+
54
+watch com.sie.snest.engine.api.response.ResponseHandle beforeBodyWrite '{params,returnObj,throwExp}' -n 100 -x 3
55
+
56
+trace com.sie.snest.engine.api.distributed.RpcInvocation invoke 'params[3]=="mbm_mes_process_match_rule"' -n 100 --skipJDKMethod false
57
+
58
+
59
+trace com.sie.snest.engine.api.RpcController service 'params[1].getParameter("businessIndex")=="04dkj8y9h3kny"' -n 20 --skipJDKMethod false
60
+
61
+watch com.sie.snest.engine.api.RpcController service '{params,returnObj,throwExp}' 'params[1].getParameter("businessIndex")=="04dkj8y9h3kny"' -n 100 -x 3
62
+
63
+trace com.sie.snest.engine.api.RpcController service 'params[1].getParameter("businessIndex")=="04dkj8y9h3kny"' -n 20 --skipJDKMethod false
64
+
65
+
66
+trace com.sie.snest.engine.api.response.ResponseHandle beforeBodyWrite -n 20 --skipJDKMethod false
67
+
68
+```
69
+ </div>
12 70
<div>
13 71
<b>目录</b>
14 72
</div>