mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/prompbmarshal: use clear() instead of a loop for clearing tss inside ResetTimeSeries()
This commit is contained in:
parent
4e65636b44
commit
614d34e539
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