# Functions
AddFlags adds configuration flags for the global stats object.
AddToValue adds to the value associated with the global key.
AreLogged returns whether global stats are getting logged.
Clear will empty out the global stats, all counters are set to 0, all values set to 0.
GetCounter returns the global count associated with the key.
GetValue returns the global value associated with the key.
IncrementCounter increments the global counter associated with the key by 1.
IncrementCounterBy increments the global counter associated with the key by the given value.
New creates new Stats object.
TrackTime will track how much time was elapsed from start time, and add that value (in given unit) to the global value associated with the key should be used like this func Something() { defer stats.TrackTime(key, time.Now(), time.Second) .
Write will write all global stats to stderr and/or a file.
WriteAndLogError is just a wrapper around Write which also logs the error to stderr if it occurs.