Repository navigation
fix(ci): transform TestChunkSize into a benchmark - #15361
Merged
Merged
Conversation
chaudum
approved these changes
Dec 12, 2024
chaudum
reviewed
Dec 12, 2024
This was referenced Dec 23, 2024
mveitas
pushed a commit
to mveitas/loki
that referenced
this pull request
Jan 6, 2025
This was referenced Feb 3, 2025
felix0102
pushed a commit
to felix0102/loki
that referenced
this pull request
Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
I am trying to fix some things in our tests and noticed that
TestChunkSizewas taking a long while and sometimes timing out the120stimeout I had. So I took a look and noticed that it was actually a benchmark masquerading as a test 😅 It wasn't actually testing anything, just collecting stats, and upon further inspection it wasn't doing a very good job of that either. So I fixed it up a bit and made it into a benchmark, to reduce the test execution time in CI.Special notes for your reviewer:
Another potential improvement here would be to make the
fillChunk()somewhat randomized. It can accept a RNG and fill the chunks with pseudo-random log lines, for more accurate tests. But that function is used in a bunch of other tests, so I decided to not make the change in this PR.Results:
Here are the results of running the new benchmark: