fix: 资源采集cpuLoadUsage除数为0导致NaN
This commit is contained in:
@@ -2,22 +2,16 @@ package model
|
||||
|
||||
// MonitorNetwork 监控_网络IO monitor_network
|
||||
type MonitorNetwork struct {
|
||||
// id
|
||||
ID int64 `json:"id" gorm:"primaryKey"`
|
||||
// 创建时间
|
||||
CreateTime int64 `json:"createTime"`
|
||||
// 网卡名
|
||||
Name string `json:"name"`
|
||||
// 上行
|
||||
Up float64 `json:"up"`
|
||||
// 下行
|
||||
Down float64 `json:"down"`
|
||||
// 网元ID 本机#号
|
||||
NeType string `json:"neType"`
|
||||
// 网元类型 本机#号
|
||||
NeID string `json:"neId"`
|
||||
ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
CreateTime int64 `json:"createTime" gorm:"create_time"` // 创建时间
|
||||
Name string `json:"name" gorm:"name"` // 网卡名
|
||||
Up float64 `json:"up" gorm:"up"` // 上行
|
||||
Down float64 `json:"down" gorm:"down"` // 下行
|
||||
NeType string `json:"neType" gorm:"ne_type"` // 网元类型
|
||||
NeID string `json:"neId" gorm:"ne_id"` // 网元ID
|
||||
}
|
||||
|
||||
func (MonitorNetwork) TableName() string {
|
||||
// TableName 表名称
|
||||
func (*MonitorNetwork) TableName() string {
|
||||
return "monitor_network"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user