Skip to content

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Apr 11, 2025

What this PR does

This PR fixes an issue where the MQE benchmarking tool could run benchmarks that did not match the provided filter, or run multiple benchmarks in the same process, producing incorrect peak memory consumption data.

This happens because go test's -bench flag takes the value provided and splits it on /, then treats each part as a separate regex. This is problematic when using a name like BenchmarkQuery/a_100, instant query/engine=Mimir, as this will match any benchmark with a_100, instant query in the second part (eg. 1 + a_100, instant query). So we need to ensure that each part is set to match the full string of that part.

Which issue(s) this PR fixes or relates to

(none)

Checklist

  • [n/a] Tests updated.
  • [n/a] Documentation added.
  • [covered by Mimir Query Engine #10067] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • [n/a] about-versioning.md updated with experimental features.

@charleskorn charleskorn marked this pull request as ready for review April 11, 2025 05:06
@charleskorn charleskorn requested a review from a team as a code owner April 11, 2025 05:06
@charleskorn charleskorn merged commit 671d74b into main Apr 11, 2025
26 checks passed
@charleskorn charleskorn deleted the charleskorn/mqe-benchmarking branch April 11, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants