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

Method result

pkg/traceql/ast_metrics.go:279–302  ·  view source on GitHub ↗
(multiplier float64)

Source from the content-addressed store, hash-verified

277}
278
279func (a *MetricsAggregate) result(multiplier float64) SeriesSet {
280 if a.agg != nil {
281 ss := a.agg.Series()
282
283 // These operations don't get scaled by the multiplier.
284 switch a.op {
285 case metricsAggregateMinOverTime, metricsAggregateMaxOverTime:
286 return ss
287 }
288
289 if multiplier > 1.0 {
290 for _, s := range ss {
291 for i := range s.Values {
292 s.Values[i] *= multiplier
293 }
294 }
295 }
296 return ss
297 }
298
299 // In the frontend-version the results come from
300 // the job-level aggregator
301 return a.seriesAgg.Results()
302}
303
304func (a *MetricsAggregate) length() int {
305 if a.agg != nil {

Callers

nothing calls this directly

Calls 2

SeriesMethod · 0.65
ResultsMethod · 0.65

Tested by

no test coverage detected