harmony 鸿蒙@ohos.arkui.performanceMonitor (Performance Monitor)

  • 2023-10-30
  • 浏览 (154)

@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

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|Yes|Type of action that triggers the user scene.| |note|string|No|Important information about the user scene.|

Example

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

performanceMonitor.end("LAUNCHER_APP_LAUNCH_FROM_ICON");

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

0  赞