diff --git a/en/application-dev/reference/apis/js-apis-bytrace.md b/en/application-dev/reference/apis/js-apis-bytrace.md index ff5fbcee930005827440c17da32630e0e372ed3b..40a50ebc4aa5ea496d19df951ff04d03240a1b93 100644 --- a/en/application-dev/reference/apis/js-apis-bytrace.md +++ b/en/application-dev/reference/apis/js-apis-bytrace.md @@ -1,7 +1,7 @@ # Performance Tracing > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** -> - The APIs of this module are no longer maintained since API version 8. It is recommended that you use the APIs of [hiTraceMeter](js-apis-hitracemeter.md) instead. +> - The APIs of this module are no longer maintained since API version 8. It is recommended that you use the APIs of [hiTraceMeter](js-apis-hitracemeter.md) instead. > - The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -12,10 +12,6 @@ import bytrace from '@ohos.bytrace'; ``` -## System Capabilities - -SystemCapability.Developtools.Bytrace - ## bytrace.startTrace @@ -23,6 +19,8 @@ startTrace(name: string, taskId: number, expectedTime?: number): void Starts a trace task. **expectedTime** is an optional parameter, which specifies the expected duration of the trace. +**System capability**: SystemCapability.Developtools.Bytrace + **Parameters** | Name| Type| Mandatory| Description| @@ -48,6 +46,8 @@ finishTrace(name: string, taskId: number): void Stops a trace task. +**System capability**: SystemCapability.Developtools.Bytrace + **Parameters** | Name| Type| Mandatory| Description| @@ -89,15 +89,17 @@ bytrace.finishTrace("myTestFunc", 1); ## bytrace.traceByValue -traceByValue(name: string, value: number): void +traceByValue(name: string, count: number): void Traces the value changes of a variable. +**System capability**: SystemCapability.Developtools.Bytrace + **Parameters** | 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**