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

Method reportTiming

query/stats.go:173–184  ·  view source on GitHub ↗

reportTiming is similar to reportTimingForCurrentBatch except that it modifies the query stats for the whole query. It's usually should be called once for each stage

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

Source from the content-addressed store, hash-verified

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
173func (qc *AQLQueryContext) reportTiming(stream unsafe.Pointer, start *time.Time, name stageName) {
174 if qc.Debug {
175 if stream != nil {
176 cgoutils.WaitForCudaStream(stream, qc.Device)
177 }
178 now := utils.Now()
179 value := now.Sub(*start).Seconds() * 1000
180 queryStats := &qc.OOPK.LiveBatchStats
181 queryStats.applyStageStats(name, value)
182 *start = now
183 }
184}
185
186// applyStageStats applies the stage stats to the overall query stats and compute max,minCallName and total for that
187// stage.

Callers 3

flushResultBufferMethod · 0.95
ProcessQueryMethod · 0.95
stats_test.goFile · 0.80

Calls 3

WaitForCudaStreamFunction · 0.92
NowFunction · 0.92
applyStageStatsMethod · 0.80

Tested by

no test coverage detected