fix: make demo disk usage static

This commit is contained in:
duorameng
2026-06-15 11:56:30 +08:00
parent 25532f2014
commit 2085cbbed2
+1 -1
View File
@@ -122,7 +122,7 @@ func (mc *MonitorController) updateDemoMetrics() {
} }
totalDisk := uint64(500 * 1024 * 1024 * 1024) // 500GB 硬盘 totalDisk := uint64(500 * 1024 * 1024 * 1024) // 500GB 硬盘
usedDisk := uint64(float64(totalDisk) * (0.4 + rand.Float64()*0.1)) // 40% - 50% 随机使用率 usedDisk := uint64(float64(totalDisk) * 0.45) // 固定 45% 使用率
mc.diskUsage = &disk.UsageStat{ mc.diskUsage = &disk.UsageStat{
Total: totalDisk, Total: totalDisk,
Used: usedDisk, Used: usedDisk,