Skip to content

metrics: speed up bucket lookups for histogram insertions #138933

@dhartunian

Description

@dhartunian

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

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-observability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions