MCPcopy
hub / github.com/containerd/containerd / TimedStore

Struct TimedStore

internal/cri/store/stats/timed_store.go:53–58  ·  view source on GitHub ↗

TimedStore is a time-based buffer for CPU stats samples. It stores samples for a specific time period and/or a max number of items, similar to cAdvisor's TimedStore but specialized for CPU stats. All methods are thread-safe.

Source from the content-addressed store, hash-verified

51// similar to cAdvisor's TimedStore but specialized for CPU stats.
52// All methods are thread-safe.
53type TimedStore struct {
54 mu sync.RWMutex
55 buffer timedStoreDataSlice
56 age time.Duration
57 maxItems int
58}
59
60// NewTimedStore creates a new TimedStore.
61// age specifies how long samples are retained.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected