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.
| 51 | // similar to cAdvisor's TimedStore but specialized for CPU stats. |
| 52 | // All methods are thread-safe. |
| 53 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected