MCPcopy Create free account
hub / github.com/cortexproject/cortex / TimeseriesFromPool

Function TimeseriesFromPool

pkg/cortexpb/timeseries.go:327–329  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
327func TimeseriesFromPool() *TimeSeries {
328 return timeSeriesPool.Get().(*TimeSeries)
329}
330
331// ReuseTimeseries puts the timeseries back into a sync.Pool for reuse.
332func ReuseTimeseries(ts *TimeSeries) {

Calls 1

GetMethod · 0.65