Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: 增加trace命令的描述 #2722

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions site/docs/doc/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

## 参数说明

| 参数名称 | 参数说明 |
| ------------------: | :----------------------------------------------------------------- |
| _class-pattern_ | 类名表达式匹配 |
| _method-pattern_ | 方法名表达式匹配 |
| _condition-express_ | 条件表达式 |
| [E] | 开启正则表达式匹配,默认为通配符匹配 |
| `[n:]` | 命令执行次数 |
| `#cost` | 方法执行耗时 |
| 参数名称 | 参数说明 |
| ------------------: |:------------------------------------------------|
| _class-pattern_ | 类名表达式匹配 |
| _method-pattern_ | 方法名表达式匹配 |
| _condition-express_ | 条件表达式 |
| [E] | 开启正则表达式匹配,默认为通配符匹配 |
| `[n:]` | 命令执行次数,默认值为 100。 |
| `#cost` | 方法执行耗时 |
| `[m <arg>]` | 指定 Class 最大匹配数量,默认值为 50。长格式为`[maxMatch <arg>]`。 |

这里重点要说明的是`条件表达式`,`条件表达式`的构成主要由 ognl 表达式组成,所以你可以这样写`"params[0]<0"`,只要是一个合法的 ognl 表达式,都能被正常支持。
Expand Down
4 changes: 2 additions & 2 deletions site/docs/en/doc/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Trace method calling path, and output the time cost for each node in the path.
## Parameters

| Name | Specification |
| ------------------: | :----------------------------------------------------------------------------------------------------- |
| ------------------: |:-------------------------------------------------------------------------------------------------------|
| _class-pattern_ | pattern for the class name |
| _method-pattern_ | pattern for the method name |
| _condition-express_ | condition expression |
| `[E]` | enable regex match, the default behavior is wildcards match |
| `[n:]` | execution times |
| `[n:]` | execution times, the default value is 100. |
| #cost | time cost |
| `[m <arg>]` | Specify the max number of matched Classes, the default value is 50. Long format is `[maxMatch <arg>]`. |

Expand Down
16 changes: 8 additions & 8 deletions tutorials/katacoda/command-trace-cn/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

### 参数说明

|参数名称|参数说明|
|---:|:---|
|*class-pattern*|类名表达式匹配|
|*method-pattern*|方法名表达式匹配|
|*condition-express*|条件表达式|
|[E]|开启正则表达式匹配,默认为通配符匹配|
|`[n:]`|命令执行次数|
|`#cost`|方法执行耗时|
|参数名称| 参数说明 |
|---:|:-------------------|
|*class-pattern*| 类名表达式匹配 |
|*method-pattern*| 方法名表达式匹配 |
|*condition-express*| 条件表达式 |
|[E]| 开启正则表达式匹配,默认为通配符匹配 |
|`[n:]`| 命令执行次数, 默认值为100 |
|`#cost`| 方法执行耗时 |

这里重点要说明的是观察表达式,观察表达式的构成主要由 ognl 表达式组成,所以你可以这样写`"{params,returnObj}"`,只要是一个合法的 ognl 表达式,都能被正常支持。

Expand Down
16 changes: 8 additions & 8 deletions tutorials/katacoda/command-trace-en/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

### Parameters

|Name|Specification|
|---:|:---|
|*class-pattern*|pattern for the class name|
|*method-pattern*|pattern for the method name|
|*condition-express*|condition expression|
|`[E]`|enable regex match, the default behavior is wildcards match|
|`[n:]`|execution times|
|#cost|time cost|
|Name| Specification |
|---:|:------------------------------------------------------------|
|*class-pattern*| pattern for the class name |
|*method-pattern*| pattern for the method name |
|*condition-express*| condition expression |
|`[E]`| enable regex match, the default behavior is wildcards match |
|`[n:]`| execution times, the default value is 100. |
|#cost| time cost |

There's one thing worthy noting here is observation expression. The observation expression supports OGNL grammar, for example, you can come up a expression like this `"{params,returnObj}"`. All OGNL expressions are supported as long as they are legal to the grammar.

Expand Down