提交 051256c9 编写于 作者: E ester.zhou

Update docs (22013)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 3276fef7
......@@ -206,6 +206,7 @@
- [@ohos.arkui.dragController (DragController)](js-apis-arkui-dragController.md)
- [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](js-apis-arkui-drawableDescriptor.md)
- [@ohos.arkui.inspector (Layout Callback)](js-apis-arkui-inspector.md)
- [@ohos.arkui.performanceMonitor (Performance Monitor)](js-apis-arkui-performancemonitor.md)
- [@ohos.arkui.UIContext (UIContext)](js-apis-arkui-UIContext.md)
- [@ohos.curves (Interpolation Calculation)](js-apis-curve.md)
- [@ohos.font (Custom Font Registration)](js-apis-font.md)
......
# @ohos.arkui.performanceMonitor (Performance Monitor)
The **performanceMonitor** module provides APIs for performance monitoring indicators: response delay, completion delay, and frame loss rate.
> **NOTE**
>
> The APIs of this module are supported since API version 10. Updates will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
## Modules to Import
```ts
import performanceMonitor from '@ohos.arkui.performanceMonitor';
```
## ActionType
Enumerates types of actions that trigger user scenes.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name| Value| Description|
| -- | -- | -- |
| LAST_DOWN | 0 | Pressing against the screen. |
| LAST_UP | 1 | Lifting a finger off the screen.|
| FIRST_MOVE | 2 | First swiping on the screen.|
## performanceMonitor.begin
begin(scene: string, startInputType: ActionType, note?: string): void
Starts a user scene.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
| Name| Type| Mandatory| Description|
| -- | -- | -- | -- |
| scene | string | Yes| User scene ID.|
| startInputType | [ActionType](#actiontype)| Yes| Type of action that triggers the user scene.|
| note | string| No| Important information about the user scene.|
**Example**
```ts
performanceMonitor.begin("LAUNCHER_APP_LAUNCH_FROM_ICON", performanceMonitor.ActionType.LAST_UP, "APP_START_BEGIN");
```
## performanceMonitor.end
end(scene: string): void
Ends a user scene.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
| Name| Type| Mandatory| Description|
| -- | -- | -- | -- |
| scene | string | Yes| User scene ID, which corresponds to that in **begin**.|
**Example**
```ts
performanceMonitor.end("LAUNCHER_APP_LAUNCH_FROM_ICON");
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册