-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: improve the memory usage of histogram #606
Conversation
Should we do this for the other metric types as well? |
I checked only |
aa76235
to
5b58cd4
Compare
@voltbit thoughts on this? Seems reasonable to me, but I have to admit I'm a bit unsure how this code works 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my read of it, this would work the same of exemplars are enabled, so should be good to go 👍
I'd like an extra pair of eyes on it, though
Looks good to me. The data struct being there when exemplars are disabled was an overlook on my side I think. |
@zbjornson @siimon master, plz help to review it if you are free, thanks. |
We have a use case where it generates a huge amount of histograms, each has more than 10 labels, we found the memory usage is quite high, under this scenario, we did an experiment and found that removing bucketExemplars field from histograms could save about
27%
memory usage for each histogram instance, hope the maintainers could review and consider it