feat:add network

#501
This commit is contained in:
samwaf
2025-10-30 11:20:58 +08:00
parent e9ffb00384
commit c0fbb15195
5 changed files with 102 additions and 14 deletions

View File

@@ -117,13 +117,17 @@ type OperatorMessageInfo struct {
// SystemStatsData 系统统计数据结构用于ECharts展示
type SystemStatsData struct {
BaseMessageInfo
Timestamp int64 `json:"timestamp"` // 时间戳
QPS uint64 `json:"qps"` // 当前QPS
LogQPS uint64 `json:"log_qps"` // 日志处理QPS
MainQueue int `json:"main_queue"` // 主数据队列数量
LogQueue int `json:"log_queue"` // 日志队列数量
StatsQueue int `json:"stats_queue"` // 统计队列数量
MessageQueue int `json:"message_queue"` // 消息队列数量
CPUPercent float64 `json:"cpu_percent"` // CPU使用百分比
MemoryPercent float64 `json:"memory_percent"` // 内存使用百分比
Timestamp int64 `json:"timestamp"` // 时间戳
QPS uint64 `json:"qps"` // 当前QPS
LogQPS uint64 `json:"log_qps"` // 日志处理QPS
MainQueue int `json:"main_queue"` // 主数据队列数量
LogQueue int `json:"log_queue"` // 日志队列数量
StatsQueue int `json:"stats_queue"` // 统计队列数量
MessageQueue int `json:"message_queue"` // 消息队列数量
CPUPercent float64 `json:"cpu_percent"` // CPU使用
MemoryPercent float64 `json:"memory_percent"` // 内存使用
NetworkRecv uint64 `json:"network_recv"` // 网络接收字节数(累计)
NetworkSent uint64 `json:"network_sent"` // 网络发送字节数(累计)
NetworkRecvRate uint64 `json:"network_recv_rate"` // 网络接收速率(字节/秒)
NetworkSentRate uint64 `json:"network_sent_rate"` // 网络发送速率(字节/秒)
}