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)
| 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. |
| 160 | func (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 |
no test coverage detected