diff --git a/arkui-plugins/ui-syntax-plugins/utils/index.ts b/arkui-plugins/ui-syntax-plugins/utils/index.ts index 0e3f34341be809724e5b4355f51a60b3c9707c88..9867e29186b217273aca2844a94849c4c4d8ff7a 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; }