Documentation
¶
Overview ¶
Package stats implements Stats that collects data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryDesc ¶
type EntryDesc struct {
// ID is unique in a Stats instance, or Register() will reject.
ID int
// Name will be part of the variable name.
Name string
}
EntryDesc defines a pair of ID and Name for a stat field.
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
Stats is a map of stats for the object.
func (*Stats) Get ¶
Get reads the value of the given stat atomically. Non-existing ID will return an error.
func (*Stats) GetStatName ¶
GetStatName returns the string name of the stat ID. Non-existing ID will return an error.
Click to show internal directories.
Click to hide internal directories.