Something like spike/freeze detector, maybe?
TheDGOfficial opened this issue ยท 0 comments
Something like spike/freeze detector, maybe? Like Spigot Watchdog (60 seconds by default, can be configured but it stops server afterwards, other than that it is the same concept as Paper's one though) or Paper Watchdog (for freezes above 5 and 10 seconds by default, does not stop the server), that works on all versions (Paper's one is great but only works in newer versions (not a limitation; patch added in newer versions), is always on (temporarily disabled when plugins loading or disabling though), sends only to console, and prints stack trace too, which may cause additional spikes)
I'm suggesting to add a similar mechanic to Spark.
Other details:
Command: /spark freezemonitor (or spikemonitor, not sure which one is better), similar to profiler, --stop would stop it (or perhaps re-typing the command when it is on)
Arguments:
/spark freezemonitor <time that can be suffixed with m or s, default to ms> Similar to tickmonitor, but for spike/freeze amount
Arguments that can be specified in any order after freeze amount: --stop stops the monitoring, --print-stack-trace prints stack trace to console (not compatible with stop argument).
When a freeze/spike happens and the monitoring is on, it would send something like "Freeze happened at dd.MM.yyyy HH:mm:ss consisting of 200 milliseconds (requested limit is 50 milliseconds)" to the player or the console. It will print the stack trace if the argument is supplied too.
It may be combined with /spark gcmonitor to find out whether it is a GC pause or not.