Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Delta ¶
type Delta struct {
MemoryDelta int64 // Can be negative if memory freed
CPUDeltaUsec uint64 // Always positive (cumulative)
DiskReadBytes uint64 // Disk read bytes delta
DiskWriteBytes uint64 // Disk write bytes delta
DiskReadOps uint64 // Read I/O operations delta
DiskWriteOps uint64 // Write I/O operations delta
}
Delta represents the difference between two Stats snapshots.
func ComputeDelta ¶
ComputeDelta calculates the difference between after and before stats.
type Reader ¶
type Reader interface {
// ReadStats returns current resource metrics for the container.
ReadStats() (*Stats, error)
// Close releases any resources held by the reader.
Close() error
// Type returns the reader implementation type for logging.
Type() string // "cgroup" or "docker"
}
Reader is the interface for reading container resource stats. Implemented by cgroupReader (cgroup v2) and dockerReader (Docker Stats API).
type Stats ¶
type Stats struct {
Memory uint64 // Current memory usage (bytes)
CPUUsage uint64 // CPU usage (microseconds, cumulative)
DiskRead uint64 // Disk read (bytes, cumulative)
DiskWrite uint64 // Disk write (bytes, cumulative)
DiskReadOps uint64 // Disk read operations (cumulative)
DiskWriteOps uint64 // Disk write operations (cumulative)
}
Stats contains a snapshot of container resource metrics.
Click to show internal directories.
Click to hide internal directories.