This commit is contained in:
Haley Wang 2024-11-13 22:47:51 +08:00
parent 694e6a58fe
commit c62034fbc3
No known key found for this signature in database
GPG key ID: C6299A8A1D6CC50C

View file

@ -27,7 +27,7 @@ func (wr *WriteRequest) Reset() {
// ResetTimeSeries clears all the GC references from tss and returns an empty tss ready for further use.
func ResetTimeSeries(tss []TimeSeries) []TimeSeries {
clear(tss)
return tss[:0]
return make([]TimeSeries, 0)
}
// MustParsePromMetrics parses metrics in Prometheus text exposition format from s and returns them.