LoopMonitor
Feeds the hub’s event-loop delay (hub.loopRecent, hub.loop), which its overload switch reads: a p99 over 30 ms in the last window sends
bigger rooms at half rate and refuses new rooms until the loop catches up. createGameServer and createRemoteServer start one; a host app
with its own server makes one next to its hub and calls stop() when it closes. windowMs (default 10 s): the span loopRecent covers;
minuteMs (default 60 s): the span of hub.loop, shown in stats(). The timers are unref’d, so they never keep a process alive.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LoopMonitor(
hub,o?):LoopMonitor
Parameters
Section titled “Parameters”Pick<RoomHub, "loop" | "loopRecent">
minuteMs?
Section titled “minuteMs?”number
windowMs?
Section titled “windowMs?”number
Returns
Section titled “Returns”LoopMonitor
Methods
Section titled “Methods”stop()
Section titled “stop()”stop():
void
Returns
Section titled “Returns”void