Skip to content
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

Replace sort.Slice with slices.SortFunc #5693

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Dec 3, 2023

What this PR does:

I see sort.Slice under sortLabelsIfNeeded taking 3% CPU time of distributor.
Similar idea of prometheus/prometheus#12539 from upstream prometheus as the new function should have a better performance. Unsure how much this could help, need some benchmark.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Ben Ye <benye@amazon.com>
@alanprot
Copy link
Member

Can we merge this?

@yeya24
Copy link
Contributor Author

yeya24 commented Mar 23, 2024

@alanprot I will try to add some benchmark first before we merge this pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants