- Documentation
- Server functions
- getPerformanceStats
Function
getPerformanceStats
Returns basic server statistics as columns and rows (uptime, players, vehicles, objects, timers, resources, number of API functions). The category, options and filter arguments are accepted, but the data set is always the same.
Syntax
table, table getPerformanceStats([string category = nil, string options = nil, string filter = nil])Arguments
categorystring, optional = nil- For compatibility with existing scripts.
optionsstring, optional = nil- For compatibility with existing scripts.
filterstring, optional = nil- For compatibility with existing scripts.
Returns
Column headers and rows { {name, value}, ... }.
Example
local columns, rows = getPerformanceStats("Lua timing")
for _, row in ipairs(rows) do outputServerLog(row[1] .. ": " .. row[2]) end