openharmony 鸿蒙 js-apis-arkui-performancemonitor-sys

2025-06-12 浏览 (2)

@ohos.arkui.performanceMonitor (Performance Monitor) (System API)

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 '@kit.ArkUI';

ActionType

Enumerates types of actions that trigger user scenes.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
LAST_DOWN0Pressing against the screen.
LAST_UP1Lifting a finger off the screen.
FIRST_MOVE2First 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

NameTypeMandatoryDescription
scenestringYesUser scene ID.
startInputTypeActionTypeYesType of action that triggers the user scene.
notestringNoImportant 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

NameTypeMandatoryDescription
scenestringYesUser scene ID, which corresponds to that in begin.

Example

performanceMonitor.end("LAUNCHER_APP_LAUNCH_FROM_ICON");

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI

harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent

harmony 鸿蒙ARKUI_TextPickerRangeContent

harmony 鸿蒙ArkUI_AnimateCompleteCallback

harmony 鸿蒙ArkUI_AttributeItem

harmony 鸿蒙ArkUI_ColorStop

harmony 鸿蒙ArkUI_ContextCallback

harmony 鸿蒙ArkUI_EventModule

harmony 鸿蒙ArkUI_ExpectedFrameRateRange

harmony 鸿蒙ArkUI_IntOffset

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/4l3M8G