MCPcopy Index your code
hub / github.com/tensorflow/tfjs / getQueryTime

Method getQueryTime

tfjs-backend-webgl/src/backend_webgl.ts:632–638  ·  view source on GitHub ↗
(query: WebGLQuery|CPUTimerQuery)

Source from the content-addressed store, hash-verified

630 }
631
632 private async getQueryTime(query: WebGLQuery|CPUTimerQuery): Promise<number> {
633 if (env().getNumber('WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE') > 0) {
634 return this.gpgpu.waitForQueryAndGetTime(query as WebGLQuery);
635 }
636 const timerQuery = query as CPUTimerQuery;
637 return timerQuery.endMs - timerQuery.startMs;
638 }
639
640 private pendingDeletes = 0;
641

Callers 1

runWebGLProgramMethod · 0.95

Calls 3

envFunction · 0.90
getNumberMethod · 0.80

Tested by

no test coverage detected