-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aggregator: don't allocate memory if we don't have tags
Before: BenchmarkGetContextNoTags-10 39929401 29.70 ns/op 16 B/op 1 allocs/op After: BenchmarkGetContextNoTags-10 419886585 2.902 ns/op 0 B/op 0 allocs/op This might look not much, but this makes a lot of difference in term of allocation when a counter is called repeatedly inside a loop.
- Loading branch information
Showing
3 changed files
with
41 additions
and
5 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