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

2025-06-12 浏览 (1)

@ohos.arkui.performanceMonitor (性能监测)(系统接口)

用户操作场景提供性能相关指标监测能力,目前仅包含响应时延、完成时延、丢帧。

说明:

从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。

本模块接口为系统接口。

导入模块

import { performanceMonitor } from '@kit.ArkUI';

ActionType

用户场景触发模式枚举。

系统能力: SystemCapability.ArkUI.ArkUI.Full

名称说明
LAST_DOWN0用户按压事件触发。
LAST_UP1用户离手事件触发。
FIRST_MOVE2用户首次滑动事件触发。

performanceMonitor.begin

begin(scene: string, startInputType: ActionType, note?: string): void

用户场景开始。

系统能力: SystemCapability.ArkUI.ArkUI.Full

参数:

参数名类型必填说明
scenestring用户场景id。
startInputTypeActionType用户场景触发模式。
notestring用户场景重要信息。

示例:

performanceMonitor.begin("LAUNCHER_APP_LAUNCH_FROM_ICON", performanceMonitor.ActionType.LAST_UP, "APP_START_BEGIN");

performanceMonitor.end

end(scene: string): void

用户场景结束

系统能力: SystemCapability.ArkUI.ArkUI.Full

参数:

参数名类型必填说明
scenestring用户场景id,与begin配对。

示例:

performanceMonitor.end("LAUNCHER_APP_LAUNCH_FROM_ICON");

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI(方舟UI框架)

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/LbkME4