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

Method getInstance

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

* @zh 获取单例实例 * @en Get singleton instance

(config?: Partial<ProfilerConfig>)

Source from the content-addressed store, hash-verified

59 * @en Get singleton instance
60 */
61 public static getInstance(config?: Partial<ProfilerConfig>): ProfilerSDK {
62 if (!ProfilerSDK._instance) {
63 ProfilerSDK._instance = new ProfilerSDK(config);
64 }
65 return ProfilerSDK._instance;
66 }
67
68 /**
69 * @zh 重置实例(测试用)

Callers 15

beginSampleMethod · 0.45
endSampleMethod · 0.45
measureMethod · 0.45
measureAsyncMethod · 0.45
beginFrameMethod · 0.45
endFrameMethod · 0.45
incrementCounterMethod · 0.45
setGaugeMethod · 0.45
setEnabledMethod · 0.45
isEnabledMethod · 0.45
getCurrentFrameMethod · 0.45
getFrameHistoryMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected