metrics: speed up bucket lookups for histogram insertions #138933
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-observability
Currently, the code used for bucket lookups during histogram insertions can be slow due to a binary search.
Once the library is copied over to our repository, we should see whether additional gains can be made by modifying the bucket lookup code to suit our particular use case.
There was a recent change merged which uses a linear search for smaller histograms prometheus/client_golang#1673. We should evaluate whether this change results in a performance gain for our use case as well, and see if linear lookup on our bucket layouts is reliably faster than binary search.
Jira issue: CRDB-46435
The text was updated successfully, but these errors were encountered: