package metrics

import "time"

// SystemSample holds one system-wide metrics snapshot.
type SystemSample struct {
	Timestamp   int64   `json:"ts"`
	CPUPercent  float64 `json:"cpu"`
	MemUsedMB   int     `json:"mem_used"`
	MemTotalMB  int     `json:"mem_total"`
	TempCelsius float64 `json:"temp"`
	LoadAvg1    float64 `json:"load1"`
	LoadAvg5    float64 `json:"load5"`
	LoadAvg15   float64 `json:"load15"`
	DiskUsedGB  float64 `json:"disk_used"`
	DiskTotalGB float64 `json:"disk_total"`
	HDDUsedGB   float64 `json:"hdd_used"`
	HDDTotalGB  float64 `json:"hdd_total"`
}

// ContainerSample holds one per-container metrics snapshot.
type ContainerSample struct {
	Timestamp       int64   `json:"ts"`
	ContainerName   string  `json:"name"`
	CPUPercent      float64 `json:"cpu"`
	MemUsageMB      float64 `json:"mem_usage"`
	MemLimitMB      float64 `json:"mem_limit"`
	NetRxBytes      int64   `json:"net_rx"`
	NetTxBytes      int64   `json:"net_tx"`
	BlockReadBytes  int64   `json:"blk_read"`
	BlockWriteBytes int64   `json:"blk_write"`
}

// ContainerCurrentStats holds the latest snapshot for a single container.
type ContainerCurrentStats struct {
	ContainerName string  `json:"name"`
	CPUPercent    float64 `json:"cpu_percent"`
	MemUsageMB    float64 `json:"mem_usage_mb"`
	MemLimitMB    float64 `json:"mem_limit_mb"`
}

// StaticSystemInfo holds static (or slowly-changing) host information.
type StaticSystemInfo struct {
	Hostname      string    `json:"hostname"`
	OS            string    `json:"os"`
	Kernel        string    `json:"kernel"`
	Architecture  string    `json:"architecture"`
	CPUModel      string    `json:"cpu_model"`
	CPUCores      int       `json:"cpu_cores"`
	UptimeSeconds int64     `json:"uptime_seconds"`
	BootTime      time.Time `json:"boot_time"`
}
