-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid lookups for cached meters in global registry (#401)
Fixes #393. CompositeRegistry has been updated to use a swappable counter and only update the copies when the set of registries is changed (rare). For cached meters, this means the only additional overhead is the cost of the wrapper and access via a volatile member variable. How much benefit this provides depends a lot of the lookup cost which depends on the overall number of meters, hashing cost of typical ids, and concurrency. For the simple case benchmared it is about a 3x improvement when using a composite with a single DefaultRegistry added in: ``` Benchmark Mode Cnt Score Error Units before thrpt 10 19433058.126 ± 4927554.937 ops/s after thrpt 10 61043422.331 ± 3085269.565 ops/s ```
- Loading branch information
1 parent
6ec448c
commit 288fcb5
Showing
23 changed files
with
576 additions
and
277 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
Oops, something went wrong.