From 2b9c110a6b7900a0aae71988b0162f4cf0af7f1b Mon Sep 17 00:00:00 2001 From: xieziang Date: Thu, 24 Jul 2025 10:59:15 +0800 Subject: [PATCH] add memo record Signed-off-by: xieziang Change-Id: I6cf5262dd3cc3e671d51b79439dfc9db6d458b2a --- arkui-plugins/ui-syntax-plugins/utils/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arkui-plugins/ui-syntax-plugins/utils/index.ts b/arkui-plugins/ui-syntax-plugins/utils/index.ts index 0e3f34341..9867e2918 100644 --- a/arkui-plugins/ui-syntax-plugins/utils/index.ts +++ b/arkui-plugins/ui-syntax-plugins/utils/index.ts @@ -448,9 +448,11 @@ export function readJSON(path: string): T | null { export function tracePerformance any>(name: string, fn: T): T { return function (this: ThisParameterType, ...args: Parameters): ReturnType { + arkts.Performance.getInstance().startMemRecord(name) arkts.Performance.getInstance().createEvent(name); const result = fn.apply(this, args); arkts.Performance.getInstance().stopEvent(name, true); + arkts.Performance.getInstance().stopMemRecord(name) return result; } as T; } -- Gitee