-
Notifications
You must be signed in to change notification settings - Fork 693
[WIP] indexheader bucket reader scratch reader benchmark and stats #13825
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
base: francoposa/indexheader-bucket-reader-scratch
Are you sure you want to change the base?
Conversation
|
Right now, collecting the caching bucket stats in this way is not interesting because they are collected after each individual matcher test - if you run the same matcher over and over again you will of course hit the cache well and not have wasted data fetches. What we would want to is run a bunch of different matchers and then collect the caching bucket stats after they all run. |
|
Further things to test after getting the more complete benchmark setup:
|
492c9c1 to
38ec762
Compare
…luesOffsetsIndexV2_WithPrefix - TODO separate benchmark & make it more interesting
7860176 to
6c80368
Compare
…o reader_benchmarks_test
<!-- Thanks for sending a pull request! Before submitting: 1. Read our CONTRIBUTING.md guide 2. Rebase your PR if it gets out of sync with main --> #### What this PR does Moves existing test fixtures defined in `pkg/storegateway/bucket_test.go` to `pkg/storage/fixtures/fixtures.go`, with some minor cleanup. This makes the same test cases importable in both `pkg/storegateway` and `pkg/storage`, allowing us to re-use the large, complex set of series selector matcher test cases in both packages. This is a preable to bringing in the rest of the indexheader-reader benchmarks from the hackathon branch at #13825. #### Which issue(s) this PR fixes or relates to Fixes #<issue number> #### Checklist - [x] Tests updated. - [ ] Documentation added. - [ ] `CHANGELOG.md` updated - the order of entries should be `[CHANGE]`, `[FEATURE]`, `[ENHANCEMENT]`, `[BUGFIX]`. If changelog entry is not needed, please add the `changelog-not-needed` label to the PR. - [ ] [`about-versioning.md`](https://github.com/grafana/mimir/blob/main/docs/sources/mimir/configure/about-versioning.md) updated with experimental features. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces importable test utilities to simplify and unify TSDB block/test data setup across packages. > > - Adds `pkg/storage/fixtures` with `FsInstrumentedBucket`, `SetupTestBlock`, `AppendTestSeries`, and `SeriesSelectorTestCases` for reusable block creation and matcher cases > - Refactors `storegateway` tests/benchmarks to use fixtures; removes duplicated helpers (`prepareTestBlock`, `appendTestSeries`, `seriesSelectionTestCases`) and `localBucket` > - Adds `testBlockToBucketBlock` adapter to wrap `fixtures.BucketTestBlock` for existing test code > - Updates assertions/paths to use `FsInstrumentedBucket.RootDir()` and shared constants > > Scope limited to test code; no production code changes > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b911ff3. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
What this PR does
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]. If changelog entry is not needed, please add thechangelog-not-neededlabel to the PR.about-versioning.mdupdated with experimental features.