-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove NewPossibleNonCounterInfo until it can be made more efficient #547
Conversation
Creating a map on every step of evaluation is expensive. This is a quick-fix; probably a better long-term solution is available. Signed-off-by: Bryan Boreham <[email protected]>
I compared commit 156222c, before annotations were added, with this PR, commit 7756556:
12x more garbage does not seem acceptable to me, so I pushed another commit which eliminates it in the case there is nothing to report.
The 4.17% extra CPU comes from |
Thank you! I added a commit to further avoid creating empty annotations, and created a PR with the same changes for the new prometheus release (benchmark details there): prometheus/prometheus#13012 |
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.
LGTM
According to benchmarks, this is very inefficient for many rate queries, temporarily removing until we find a better way.
With before as without the removed code, and after as with: