update grpc-go & protobuf definition (#455)

This commit is contained in:
UUBulb
2024-10-24 20:41:47 +08:00
committed by GitHub
parent c632d41702
commit 31520debb2
7 changed files with 91 additions and 136 deletions

View File

@@ -66,8 +66,8 @@ func (u *Rule) Snapshot(cycleTransferStats *CycleTransferStats, server *Server,
switch u.Type {
case "cpu":
src = float64(server.State.CPU)
case "gpu":
src = float64(server.State.GPU)
case "gpu_max":
src = slices.Max(server.State.GPU)
case "memory":
src = percentage(server.State.MemUsed, server.Host.MemTotal)
case "swap":