mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-03 13:11:53 +02:00
Remove commented out method in exponential_histogram.go (#4429)
This commit is contained in:
parent
d9afe946d4
commit
b44a2bbc36
@ -393,6 +393,7 @@ func (e *expoHistogram[N]) delta(dest *metricdata.Aggregation) int {
|
||||
*dest = h
|
||||
return n
|
||||
}
|
||||
|
||||
func (e *expoHistogram[N]) cumulative(dest *metricdata.Aggregation) int {
|
||||
t := now()
|
||||
|
||||
@ -443,55 +444,3 @@ func (e *expoHistogram[N]) cumulative(dest *metricdata.Aggregation) int {
|
||||
*dest = h
|
||||
return n
|
||||
}
|
||||
|
||||
// Aggregate records the measurement, scoped by attr, and aggregates it
|
||||
// into an aggregation.
|
||||
// func (e *cumulativeExponentialHistogram[N]) Aggregation() metricdata.Aggregation {
|
||||
// e.valuesMu.Lock()
|
||||
// defer e.valuesMu.Unlock()
|
||||
|
||||
// if len(e.values) == 0 {
|
||||
// return nil
|
||||
// }
|
||||
// t := now()
|
||||
// h := metricdata.ExponentialHistogram[N]{
|
||||
// Temporality: metricdata.CumulativeTemporality,
|
||||
// DataPoints: make([]metricdata.ExponentialHistogramDataPoint[N], 0, len(e.values)),
|
||||
// }
|
||||
// for a, b := range e.values {
|
||||
// ehdp := metricdata.ExponentialHistogramDataPoint[N]{
|
||||
// Attributes: a,
|
||||
// StartTime: e.start,
|
||||
// Time: t,
|
||||
// Count: b.count,
|
||||
// Scale: int32(b.scale),
|
||||
// ZeroCount: b.zeroCount,
|
||||
// ZeroThreshold: 0.0,
|
||||
// PositiveBucket: metricdata.ExponentialBucket{
|
||||
// Offset: int32(b.posBuckets.startBin),
|
||||
// Counts: make([]uint64, len(b.posBuckets.counts)),
|
||||
// },
|
||||
// NegativeBucket: metricdata.ExponentialBucket{
|
||||
// Offset: int32(b.negBuckets.startBin),
|
||||
// Counts: make([]uint64, len(b.negBuckets.counts)),
|
||||
// },
|
||||
// }
|
||||
// copy(ehdp.PositiveBucket.Counts, b.posBuckets.counts)
|
||||
// copy(ehdp.NegativeBucket.Counts, b.negBuckets.counts)
|
||||
|
||||
// if !e.noMinMax {
|
||||
// ehdp.Min = metricdata.NewExtrema(b.min)
|
||||
// ehdp.Max = metricdata.NewExtrema(b.max)
|
||||
// }
|
||||
// if !e.noSum {
|
||||
// ehdp.Sum = b.sum
|
||||
// }
|
||||
// h.DataPoints = append(h.DataPoints, ehdp)
|
||||
// // TODO (#3006): This will use an unbounded amount of memory if there
|
||||
// // are unbounded number of attribute sets being aggregated. Attribute
|
||||
// // sets that become "stale" need to be forgotten so this will not
|
||||
// // overload the system.
|
||||
// }
|
||||
|
||||
// return h
|
||||
// }
|
||||
|
Loading…
x
Reference in New Issue
Block a user