Home / Server

server.tps()

server.tps()

Returns the server's recent TPS (ticks per second) and tick timing metrics.

Parameters

None.

Returns

Three numbers returned by the server's TPS sampler: recent TPS and tick timing metrics. Their exact sampling windows are determined by the server implementation.

Example

command('lag', function(sender)
  local t1, t2, t3 = server.tps()
  sender:send(string.format("TPS: %.1f, %.1f, %.1f", t1, t2, t3))
  return true
end)