stats

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2022 License: BSD-2-Clause Imports: 6 Imported by: 1

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

func Config(c config.Config)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL