TimeseriesFromPool retrieves a pointer to a TimeSeries from a sync.Pool. ReuseTimeseries should be called once done, unless ReuseSlice was called on the slice that contains this TimeSeries.
()
| 325 | // TimeseriesFromPool retrieves a pointer to a TimeSeries from a sync.Pool. |
| 326 | // ReuseTimeseries should be called once done, unless ReuseSlice was called on the slice that contains this TimeSeries. |
| 327 | func TimeseriesFromPool() *TimeSeries { |
| 328 | return timeSeriesPool.Get().(*TimeSeries) |
| 329 | } |
| 330 | |
| 331 | // ReuseTimeseries puts the timeseries back into a sync.Pool for reuse. |
| 332 | func ReuseTimeseries(ts *TimeSeries) { |