Documentation
¶
Overview ¶
pkg/metrics/metrics.go
pkg/metrics/storage.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GatherUsage ¶
func GatherUsage(interval int)
func SaveMetricsToFile ¶
func SaveMetricsToFile(metric Metric)
Types ¶
type Metric ¶
type Metric struct {
Timestamp time.Time `json:"timestamp"`
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage float64 `json:"memory_usage"`
}
Metric represents the system usage metrics.
type MetricsStore ¶
MetricsStore is a thread-safe store for metrics.
Click to show internal directories.
Click to hide internal directories.