Dev stats now print to console instead

This commit is contained in:
Logan G 2022-03-26 02:34:32 -06:00
parent 236977ba5c
commit 5c097d9fe0
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -42,18 +42,22 @@ do
local plys = 0
local function displayStats()
core:log(log.TEXT, "---------------------------")
core:log(log.TEXT, "Server Stats:")
core:log(log.INFO, "Max CPU: ", core.colors.text, math.round(core.maxCPU*1000000).."us ("..math.round(core.maxCPU*100/quotaMax()).."%)")
core:log(log.INFO, "Max RAM: ", core.colors.text, math.round(core.maxRAM).."kB ("..math.round(core.maxRAM*100/ramMax()).."%)")
core:log(log.INFO, "Min Net: ", core.colors.text, core.minNet.." bytes")
core:log(log.TEXT, "Client Stats:")
core:log(log.INFO, "Max CPU: ", core.colors.text, math.round(peakClientCPUTime*1000000).."us")
core:log(log.INFO, "Max CPU %: ", core.colors.text, math.round(peakClientCPUPercent*100, 2).."%")
core:log(log.INFO, "Max RAM: ", core.colors.text, math.round(peakClientRAM).."kB")
core:log(log.INFO, "Max RAM %: ", core.colors.text, math.round(peakClientRAMPercent*100, 2).."%")
core:log(log.INFO, "Min Net: ", core.colors.text, minClientNet.." bytes")
core:log(log.TEXT, "---------------------------")
core:logConsole(log.TEXT, "---------------------------")
core:logConsole(log.TEXT, "Server Stats:")
core:logConsole(log.INFO, "Max CPU: ", core.colors.text, math.round(core.maxCPU*1000000).."us ("..math.round(core.maxCPU*100/quotaMax()).."%)")
core:logConsole(log.INFO, "Max RAM: ", core.colors.text, math.round(core.maxRAM).."kB ("..math.round(core.maxRAM*100/ramMax()).."%)")
core:logConsole(log.INFO, "Min Net: ", core.colors.text, core.minNet.." bytes")
core:logConsole(log.TEXT, "")
core:logConsole(log.TEXT, "Client Stats:")
core:logConsole(log.INFO, "Max CPU: ", core.colors.text, math.round(peakClientCPUTime*1000000).."us")
core:logConsole(log.INFO, "Max CPU %: ", core.colors.text, math.round(peakClientCPUPercent*100, 2).."%")
core:logConsole(log.INFO, "Max RAM: ", core.colors.text, math.round(peakClientRAM).."kB")
core:logConsole(log.INFO, "Max RAM %: ", core.colors.text, math.round(peakClientRAMPercent*100, 2).."%")
core:logConsole(log.INFO, "Min Net: ", core.colors.text, minClientNet.." bytes")
core:logConsole(log.INFO, "Errored Clients: ", core.colors.text, #chip():getErroredPlayers())
core:logConsole(log.TEXT, "---------------------------")
core:log(log.INFO, "Finished, check your developer console.")
end