-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve components that are used to unit test instrumentation logic (#…
…129) * Add support for monotomic clocks to manipulate time The `MonotonicClock` interface offers an abstraction for us to manipulate time in test. It aims to improve the implementation of `TestScope` so that develpers can verify metric recording of timers and histograms. * Fix Snapshot computation in TestScope The following changes have been made as part of this commit: 1. Refactored how snapshots are created to leverage the same reporting mechanism used in regular metrics recording. 2. Fixed snapshots for Timers. The previous `TimerImpl` implementation relied on `NoReporterSink` to properly create `TimerSnapshots`. However given `TestScope` instances are built with `NullStatsReporter`, `TimerSnapshots` were not being created at all when using `TestScope`. 3. Leveraged the `ImmutableBuckets` implementation to compute bucket bounds in `HistogramImpl`, allowing removal of a substantial amount of duplicated code. 4. Added unit tests to cover the fixes for `TimerSnapshots` as well as the changes to the snapshot creation logic. * Remove code warnings No functionality change. Just removal of warnings in the code. * Remove warnings and fix typos in *.md files
- Loading branch information
Showing
37 changed files
with
1,089 additions
and
755 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
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.