Documentation
¶
Overview ¶
Package counters is the generic user-defined counter API: one line in application code (isutools.Count("cache_hit")) makes cache hit/miss and similar custom events visible per benchmark generation.
Index ¶
Constants ¶
View Source
const ( // DefaultMaxNames bounds dynamic counter identities per generation. DefaultMaxNames = 1024 // MaxNameBytes bounds the retained memory for each identity. MaxNameBytes = 128 // OverflowName receives observations outside either bound. OverflowName = "(other)" )
Variables ¶
View Source
var Default = NewRegistry()
Default is the registry the facade helpers write into.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is a concurrency-safe named counter set.
func (*Registry) Dropped ¶ added in v1.1.0
Dropped returns how many observations were merged into OverflowName.
Click to show internal directories.
Click to hide internal directories.