forked from grafana/tempo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/tempo-vulture: share rand.Rand instance across multiple searches
grafana#1760 noted that creating a new rand.Rand every time a random number is generated causes a poor distrubution of the search space, where numbers appear 7x more frequently than they do when using a shared rand.Rand instance. This is demonstrated using the following Go playground link: https://go.dev/play/p/EkhINRfOO5p This commit changes Vulture to use a shared rand.Rand instance instead of creating a new one each time a search or read is performed.
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 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