mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
clean up
Signed-off-by: Callum Styan <callumstyan@gmail.com>
This commit is contained in:
parent
6c731e3603
commit
39fb4ac4f5
|
@ -1742,12 +1742,9 @@ func buildTimeSeries(timeSeries []prompb.TimeSeries, filter func(prompb.TimeSeri
|
|||
var lowest int64
|
||||
var droppedSamples, droppedExemplars, droppedHistograms int
|
||||
|
||||
//keepIdx := 0
|
||||
lowest = math.MaxInt64
|
||||
//for i, ts := range timeSeries {
|
||||
timeSeries = slices.DeleteFunc(timeSeries, func(ts prompb.TimeSeries) bool {
|
||||
if filter != nil && filter(ts) {
|
||||
//fmt.Println("deleteing")
|
||||
if len(ts.Samples) > 0 {
|
||||
droppedSamples++
|
||||
}
|
||||
|
@ -1782,13 +1779,8 @@ func buildTimeSeries(timeSeries []prompb.TimeSeries, filter func(prompb.TimeSeri
|
|||
lowest = ts.Histograms[0].Timestamp
|
||||
}
|
||||
return false
|
||||
// Move the current element to the write position and increment the write pointer
|
||||
//timeSeries[keepIdx] = timeSeries[i]
|
||||
//keepIdx++
|
||||
})
|
||||
|
||||
//timeSeries = timeSeries[:keepIdx]
|
||||
//fmt.Println("timeseries: ", timeSeries)
|
||||
return highest, lowest, timeSeries, droppedSamples, droppedExemplars, droppedHistograms
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue