update watch doc

pull/340/head
hengyunabc 6 years ago
parent e4723bf8bf
commit 9d35b1a436

@ -2,6 +2,7 @@ package com.taobao.arthas.core.command;
/**
* @author ralf0131 2016-12-14 17:21.
* @author hengyunabc 2018-12-03
*/
public interface Constants {
@ -12,7 +13,8 @@ public interface Constants {
" target : the object\n" +
" clazz : the object's class\n" +
" method : the constructor or method\n" +
" params[0..n] : the parameters of method\n" +
" params : the parameters array of method\n" +
" params[0..n] : the element of parameters array\n" +
" returnObj : the returned object of method\n" +
" throwExp : the throw exception of method\n" +
" isReturn : the method ended by return\n" +
@ -26,6 +28,7 @@ public interface Constants {
String WIKI_HOME = " https://alibaba.github.io/arthas/";
String EXPRESS_EXAMPLES = "Examples:\n" +
" params\n" +
" params[0]\n" +
" 'params[0]+params[1]'\n" +
" returnObj\n" +

@ -37,6 +37,8 @@ Advanced:
### Usage
#### Start Demo
Start `arthas-demo` in [Quick Start](quick-start.md).
#### Check the `out parameters` and `return value`
@ -223,7 +225,7 @@ ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
* `target.field_name`: the field of the current object.
```
```bash
$ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.

@ -38,6 +38,8 @@ watch 的参数比较多,主要是因为它能在 4 个不同的场景观察
### 使用参考
#### 启动 Demo
启动[快速入门](quick-start.md)里的`arthas-demo`。
#### 观察方法出参和返回值
@ -223,7 +225,7 @@ ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
然后使用`target.field_name`访问当前对象的某个属性
```
```bash
$ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.

Loading…
Cancel
Save