未验证 提交 3ac9a63b 编写于 作者: O openharmony_ci 提交者: Gitee

!1823 HiTrace一致性问题修复

Merge pull request !1823 from honghecun/master
......@@ -58,7 +58,7 @@ Defines a **HiTraceId** object.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| chainId | bigint | Yes| Call chain ID.|
| spandId | number | No| Span ID.|
| spanId | number | No| Span ID.|
| parentSpanId | number | No| Parent span ID.|
| flags | number | No| Trace flag combination.|
......
......@@ -18,9 +18,9 @@ SystemCapability.HiviewDFX.HiTrace
## hiTraceMeter.startTrace
startTrace(name: string, taskId: number, expectedTime?: number): void
startTrace(name: string, taskId: number): void
Starts a trace task. **expectedTime** is an optional parameter, which specifies the expected duration of the trace.
Starts a trace task.
If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be performed multiple times concurrently, different task IDs must be specified in **startTrace**.
......@@ -32,13 +32,11 @@ If the trace tasks with the same name are not performed at the same time, the sa
| -------- | -------- | -------- | -------- |
| name | string | Yes| Name of the trace task to start.|
| taskId | number | Yes| Task ID.|
| expectedTime | number | No| Expected duration of the trace, in ms.|
**Example**
```
hiTraceMeter.startTrace("myTestFunc", 1);
hiTraceMeter.startTrace("myTestFunc", 1, 5); // The expected duration of the trace task is 5 ms.
```
......@@ -88,7 +86,7 @@ hiTraceMeter.finishTrace("myTestFunc", 1);
## hiTraceMeter.traceByValue
traceByValue(name: string, value: number): void
traceByValue(name: string, count: number): void
Traces the value changes of a variable.
......@@ -97,7 +95,7 @@ Traces the value changes of a variable.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| name | string | Yes| Name of the variable.|
| value | number | Yes| Value of the variable.|
| count | number | Yes| Value of the variable.|
**Example**
```
......
......@@ -58,7 +58,7 @@ SystemCapability.HiviewDFX.HiTrace
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| chainId | bigint | 是 | 跟踪链标识。 |
| spandId | number | 否 | 分支标识。 |
| spanId | number | 否 | 分支标识。 |
| parentSpanId | number | 否 | 父分支标识。 |
| flags | number | 否 | 跟踪标志组合。 |
......
......@@ -18,7 +18,7 @@ SystemCapability.HiviewDFX.HiTrace
## hiTraceMeter.startTrace
startTrace(name: string, taskId: number, expectedTime?: number): void
startTrace(name: string, taskId: number): void
标记一个预追踪耗时任务的开始,expectedTime是可选参数,标识该任务的期望耗时。
......@@ -32,7 +32,6 @@ startTrace(name: string, taskId: number, expectedTime?: number): void
| -------- | -------- | -------- | -------- |
| name | string | 是 | 要追踪的任务名称 |
| taskId | number | 是 | 任务id |
| expectedTime | number | 否 | 期望的耗时时间,单位:ms |
**示例:**
......@@ -88,7 +87,7 @@ hiTraceMeter.finishTrace("myTestFunc", 1);
## hiTraceMeter.traceByValue
traceByValue(name: string, value: number): void
traceByValue(name: string, count: number): void
用来标记一个预追踪的数值变量,该变量的数值会不断变化。
......@@ -97,7 +96,7 @@ traceByValue(name: string, value: number): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 要追踪的数值变量名称 |
| value | number | 是 | 变量的值 |
| count | number | 是 | 变量的值 |
**示例:**
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册