mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
lib/prompbmarshal: use clear() instead of a loop for clearing tss inside ResetTimeSeries()
This commit is contained in:
parent
b958135677
commit
d4a425af87
1 changed files with 1 additions and 3 deletions
|
@ -26,8 +26,6 @@ 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 {
|
||||
for i := range tss {
|
||||
tss[i] = TimeSeries{}
|
||||
}
|
||||
clear(tss)
|
||||
return tss[:0]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue