MCPcopy
hub / github.com/grafana/tempo / NewBaselineAggregator

Function NewBaselineAggregator

pkg/traceql/engine_metrics_compare.go:368–379  ·  view source on GitHub ↗
(req *tempopb.QueryRangeRequest, topN int, exemplars uint32)

Source from the content-addressed store, hash-verified

366}
367
368func NewBaselineAggregator(req *tempopb.QueryRangeRequest, topN int, exemplars uint32) *BaselineAggregator {
369 return &BaselineAggregator{
370 baseline: make(map[string]map[StaticMapKey]staticWithTimeSeries),
371 selection: make(map[string]map[StaticMapKey]staticWithTimeSeries),
372 baselineTotals: make(map[string]map[StaticMapKey]staticWithTimeSeries),
373 selectionTotals: make(map[string]map[StaticMapKey]staticWithTimeSeries),
374 maxed: make(map[string]struct{}),
375 intervalMapper: NewIntervalMapperFromReq(req),
376 topN: topN,
377 exemplarBuckets: newExemplarBucketSet(exemplars, req.Start, req.End, req.Step, IsInstant(req)),
378 }
379}
380
381func (b *BaselineAggregator) Combine(ss []*tempopb.TimeSeries) {
382 for _, s := range ss {

Callers 1

initMethod · 0.85

Calls 3

NewIntervalMapperFromReqFunction · 0.85
newExemplarBucketSetFunction · 0.85
IsInstantFunction · 0.85

Tested by

no test coverage detected