Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartSampler ¶
StartSampler starts a background goroutine that samples per-core CPU usage at the given interval. Call once at startup before serving requests.
Types ¶
type MemoryInfo ¶
type SystemInfo ¶
type SystemInfo struct {
Uptime int64 `json:"uptime"`
Timestamp string `json:"timestamp"`
CPU CPUInfo `json:"cpu"`
Memory MemoryInfo `json:"memory"`
Disk []DiskInfo `json:"disk"`
}
func MeasureSystem ¶
func MeasureSystem() (SystemInfo, error)
Click to show internal directories.
Click to hide internal directories.