(q *tempopb.QueryRangeRequest, mode AggregateMode)
| 76 | } |
| 77 | |
| 78 | func (m *MetricsCompare) init(q *tempopb.QueryRangeRequest, mode AggregateMode) { |
| 79 | switch mode { |
| 80 | case AggregateModeRaw: |
| 81 | m.intervalMapper = NewIntervalMapperFromReq(q) |
| 82 | m.baselines = make(map[Attribute]map[StaticMapKey]*staticWithCounts) |
| 83 | m.selections = make(map[Attribute]map[StaticMapKey]*staticWithCounts) |
| 84 | m.baselineTotals = make(map[Attribute][]float64) |
| 85 | m.selectionTotals = make(map[Attribute][]float64) |
| 86 | m.maxExemplars = q.Exemplars |
| 87 | |
| 88 | case AggregateModeSum: |
| 89 | m.seriesAgg = NewSimpleCombiner(q, sumAggregation) |
| 90 | return |
| 91 | |
| 92 | case AggregateModeFinal: |
| 93 | m.seriesAgg = NewBaselineAggregator(q, m.topN, q.Exemplars) |
| 94 | return |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | func (m *MetricsCompare) isSelection(span Span, spanStartTime uint64) Static { |
| 99 | // Determine if this span is inside the selection |
nothing calls this directly
no test coverage detected