MCPcopy Create free account
hub / github.com/esengine/esengine / measureAsync

Method measureAsync

packages/core/src/Utils/Profiler/ProfilerSDK.ts:105–111  ·  view source on GitHub ↗

* 测量异步函数执行时间

(
        name: string,
        fn: () => Promise<T>,
        category: ProfileCategory = ProfileCategory.Custom
    )

Source from the content-addressed store, hash-verified

103 * 测量异步函数执行时间
104 */
105 public static async measureAsync<T>(
106 name: string,
107 fn: () => Promise<T>,
108 category: ProfileCategory = ProfileCategory.Custom
109 ): Promise<T> {
110 return ProfilerSDK.getInstance().measureAsync(name, fn, category);
111 }
112
113 /**
114 * 开始帧

Callers 1

Calls 3

beginSampleMethod · 0.95
endSampleMethod · 0.95
getInstanceMethod · 0.45

Tested by

no test coverage detected