PreallocTimeseriesSliceFromPool retrieves a slice of PreallocTimeseries from a sync.Pool. ReuseSlice should be called once done.
()
| 310 | // PreallocTimeseriesSliceFromPool retrieves a slice of PreallocTimeseries from a sync.Pool. |
| 311 | // ReuseSlice should be called once done. |
| 312 | func PreallocTimeseriesSliceFromPool() []PreallocTimeseries { |
| 313 | return slicePool.Get().([]PreallocTimeseries) |
| 314 | } |
| 315 | |
| 316 | // ReuseSlice puts the slice back into a sync.Pool for reuse. |
| 317 | func ReuseSlice(ts []PreallocTimeseries) { |