fix(ci): transform TestChunkSize into a benchmark #15361
Merged
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
TestChunkSize
was taking a long while and sometimes timing out the120s
timeout 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: