Merge the provided Stats into this one.
(other *QueryStats)
| 380 | |
| 381 | // Merge the provided Stats into this one. |
| 382 | func (s *QueryStats) Merge(other *QueryStats) { |
| 383 | if s == nil || other == nil { |
| 384 | return |
| 385 | } |
| 386 | |
| 387 | s.AddWallTime(other.LoadWallTime()) |
| 388 | s.AddQueryStorageWallTime(other.LoadQueryStorageWallTime()) |
| 389 | s.AddFetchedSeries(other.LoadFetchedSeries()) |
| 390 | s.AddFetchedChunkBytes(other.LoadFetchedChunkBytes()) |
| 391 | s.AddFetchedDataBytes(other.LoadFetchedDataBytes()) |
| 392 | s.AddFetchedSamples(other.LoadFetchedSamples()) |
| 393 | s.AddFetchedChunks(other.LoadFetchedChunks()) |
| 394 | s.AddStoreGatewayTouchedPostings(other.LoadStoreGatewayTouchedPostings()) |
| 395 | s.AddStoreGatewayTouchedPostingBytes(other.LoadStoreGatewayTouchedPostingBytes()) |
| 396 | s.AddScannedSamples(other.LoadScannedSamples()) |
| 397 | s.SetPeakSamples(max(s.LoadPeakSamples(), other.LoadPeakSamples())) |
| 398 | s.AddExtraFields(other.LoadExtraFields()...) |
| 399 | } |
| 400 | |
| 401 | func ShouldTrackHTTPGRPCResponse(r *httpgrpc.HTTPResponse) bool { |
| 402 | // Do no track statistics for requests failed because of a server error. |