-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a prototype for the collection of transient performance statistics. It does not yet expose "useful" runtime statistics, but is meant to lay the groundwork for doing so across different parts of the system. We were previously using the `go-metrics` package, which provides the concept of a `Registry` bundling different metrics. Unfortunately, various limitations, a certain amount of interface bloat (which made it annoying to provide custom implementations) and various design choices made this unwieldy to work with without upstream adaptations. Instead, introduced the `util/metric` package which replaces the registry functionality and provides light wrapper implementations around metrics. Each registry object owns its metrics' goroutines and terminates them using a closer channel; this allows for easy integration with `util.Stopper`. Metric registries can be nested and in fact we do so, keeping one "global" metrics registry and various others in it. In particular Node- and Store-level metrics have individual registries. This is useful since this allows their metrics to be stored to their corresponding time series with simple iterations over a registry and with correct names globally and locally. For now, we wrap `Counter`, `Gauge` and `EWMA` types and provide a windowed histogram (based on Gil Tene's `HDRHistogram`s). Others (such as reservoir backed histograms can be added as required.
- Loading branch information
Showing
18 changed files
with
588 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.