Discover Packages
github.com/richardmarshall/kit
metrics
internal
ratemap
package
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Nov 15, 2016
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package ratemap implements a goroutine-safe map of string to float64. It can
be embedded in implementations whose metrics support fixed sample rates, so
that an additional parameter doesn't have to be tracked through the e.g.
lv.Space object.
RateMap is a simple goroutine-safe map of string to float64.
New returns a new RateMap.
Get retrieves the rate for the given name, or 1.0 if none is set.
Get is safe for concurrent access by multiple goroutines.
Set writes the given name/rate pair to the map.
Set is safe for concurrent access by multiple goroutines.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.