Documentation ¶
Overview ¶
Package stats is used to report on runtime statistics for the WolfMUD server. The package is configured by the Stats.Rate and Stats.GC values in the server configuration file. Statistics will be written to the server log in the following format:
A[n] O[n ±n] T[n ±n] E[n ±n] P[n max]
Where:
A[ n] - Runtime allocations since last collection O[n ±n] - Runtime objects / change since last collection T[n ±n] - Thing in the world / change since last collection E[n ±n] - In-flight active events / change since last collection P[n max] - Current number of players / maximum number of players
Forcing garbage collection will provide more accurate statistics. However, there will be a nominal hit on performance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Config ¶ added in v0.0.19
Config sets up package configuration for settings that can't be constants. It should be called by main, only once, before anything else starts. Once the configuration is set it should be treated as immutable an not changed.
func Start ¶
func Start()
Start statistics collection. The configured collection rate is checked, if zero statistics collection is disabled. Otherwise statistics are collected by calling stats.collect every cfg.rate periods.
Types ¶
This section is empty.