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

Function NewHistogramAggregator

pkg/traceql/engine_metrics.go:1851–1862  ·  view source on GitHub ↗
(req *tempopb.QueryRangeRequest, qs []float64, exemplarLimit uint32)

Source from the content-addressed store, hash-verified

1849}
1850
1851func NewHistogramAggregator(req *tempopb.QueryRangeRequest, qs []float64, exemplarLimit uint32) *HistogramAggregator {
1852 return &HistogramAggregator{
1853 ss: make(map[string]histSeries),
1854 qs: qs,
1855 intervalMapper: NewIntervalMapperFromReq(req),
1856 exemplarLimit: exemplarLimit,
1857 labelBuffer: make(Labels, 0, 8), // Pre-allocate with reasonable capacity
1858 exemplarBucketsCreator: func() bucketSet {
1859 return newExemplarBucketSet(exemplarLimit, req.Start, req.End, req.Step, IsInstant(req))
1860 },
1861 }
1862}
1863
1864func (h *HistogramAggregator) Combine(in []*tempopb.TimeSeries) {
1865 for _, ts := range in {

Calls 3

NewIntervalMapperFromReqFunction · 0.85
newExemplarBucketSetFunction · 0.85
IsInstantFunction · 0.85