MCPcopy
hub / github.com/uber/aresdb / reportTimingForCurrentBatch

Method reportTimingForCurrentBatch

query/stats.go:160–169  ·  view source on GitHub ↗

reportTimingForCurrentBatch will first wait for current cuda stream if the debug mode is set and change the timing stat accordingly. It will add to the total timing as well. Therefore this function should only be called one time for each stage.

(stream unsafe.Pointer, start *time.Time, name stageName)

Source from the content-addressed store, hash-verified

158// reportTimingForCurrentBatch will first wait for current cuda stream if the debug mode is set and change the timing stat accordingly.
159// It will add to the total timing as well. Therefore this function should only be called one time for each stage.
160func (qc *AQLQueryContext) reportTimingForCurrentBatch(stream unsafe.Pointer, start *time.Time, name stageName) {
161 if qc.Debug {
162 cgoutils.WaitForCudaStream(stream, qc.Device)
163 now := utils.Now()
164 value := now.Sub(*start).Seconds() * 1000
165 qc.OOPK.currentBatch.stats.timings[name] = value
166 qc.OOPK.currentBatch.stats.totalTiming += value
167 *start = now
168 }
169}
170
171// reportTiming is similar to reportTimingForCurrentBatch except that it modifies the query stats for the
172// whole query. It's usually should be called once for each stage

Callers 13

processBatchMethod · 0.95
projectMethod · 0.80
expandDimensionsMethod · 0.80
postExecMethod · 0.80
stats_test.goFile · 0.80
filterMethod · 0.80
joinMethod · 0.80
evalMeasuresMethod · 0.80
evalDimensionsMethod · 0.80
projectMethod · 0.80
reduceMethod · 0.80
preExecMethod · 0.80

Calls 2

WaitForCudaStreamFunction · 0.92
NowFunction · 0.92

Tested by

no test coverage detected