Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistorySample ¶
type HistorySample struct {
T int64 `json:"t"`
Tx float64 `json:"tx"`
Av float64 `json:"av"`
Pk float64 `json:"pk"`
Dr float64 `json:"dr"`
}
HistorySample is one time-series data point for a single CAKE interface. All numeric values are float64 so they can be directly consumed by charting libraries (uPlot, Chart.js, etc.).
type HistoryStore ¶
type HistoryStore struct {
// contains filtered or unexported fields
}
HistoryStore is a thread-safe collection of per-interface ring buffers.
func NewHistoryStore ¶
func NewHistoryStore(capacity int) *HistoryStore
func (*HistoryStore) Record ¶
func (hs *HistoryStore) Record(stats []types.CakeStats, interval time.Duration)
func (*HistoryStore) Snapshot ¶
func (hs *HistoryStore) Snapshot() map[string][]HistorySample
Click to show internal directories.
Click to hide internal directories.