1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-15 17:46:55 +00:00

Bugfixes: div0, wrong low-mem condition, race

This commit is contained in:
Kane York 2015-12-23 21:55:15 -08:00
parent bbe8b41fed
commit 18c1abd3e3
3 changed files with 24 additions and 12 deletions

View file

@ -122,7 +122,7 @@ func updatePeriodicStats() {
Statistics.CpuUsagePct = 100 * float64(userTicks+sysTicks) / (timeDiff.Seconds() * float64(ticksPerSecond))
Statistics.MemoryRSSKB = uint64(pstat.Rss * pageSize / 1024)
Statistics.MemPerClientBytes = (Statistics.MemoryRSSKB * 1024) / Statistics.CurrentClientCount
Statistics.MemPerClientBytes = (Statistics.MemoryRSSKB * 1024) / (Statistics.CurrentClientCount + 1)
}
updateSysMem()
}