Repository navigation
test: database growth + load-time soak #609
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
32ab502
test: database growth + load-time soak
DropTabl e84537c
perf(db): read the newest N days without sorting all of history
DropTabl c7492ad
test: time the newest-N read against the query it replaced
DropTabl c290d90
test(soak): address review findings
DropTabl b253ce5
test(soak): DST-safe template day, validate SOAK_HISTORY up front
DropTabl db97d69
Merge branch 'main' into fix/served-day-scan
abdulsaheel 288615a
Merge branch 'fix/db-size-and-sync-speed' into fix/served-day-scan
abdulsaheel 5f0d3c7
keep the existing tests as they were formatted
abdulsaheel 2bbba0b
pick the newest days first in recentDayScalars too
abdulsaheel 4a797e8
Merge branch 'main' into test/db-growth-soak
abdulsaheel 86f8a19
Merge branch 'fix/db-size-and-sync-speed' into test/db-growth-soak
abdulsaheel 006fd3c
Merge branch 'fix/served-day-scan' into test/db-growth-soak
abdulsaheel 626aeaa
Merge branch 'main' into fix/served-day-scan
abdulsaheel 699464b
Merge branch 'main' into test/db-growth-soak
abdulsaheel a547bba
Merge branch 'fix/served-day-scan' into test/db-growth-soak
abdulsaheel bfb3617
run the sibling pin guard before pub get in the soak workflow
abdulsaheel 2953cfc
write the soak report however the run ends
abdulsaheel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: soak | ||
|
|
||
| # Database growth + load-time soak (test/db_growth_soak_test.dart). Too slow | ||
| # for every PR — a simulated day costs ~15-30 s through the real ingest — so it | ||
| # runs nightly and on demand, and the per-day size report is kept as an | ||
| # artifact either way. | ||
| on: | ||
| schedule: | ||
| - cron: '30 2 * * *' | ||
| workflow_dispatch: | ||
| inputs: | ||
| days: | ||
| description: Live days to simulate | ||
| default: '30' | ||
| history: | ||
| description: History lengths (days) to time loads at | ||
| default: '30,180,365,730' | ||
|
|
||
| # Per event, so a manual run never cancels the nightly one before its report | ||
| # is uploaded. | ||
| concurrency: | ||
| group: soak-${{ github.ref }}-${{ github.event_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| soak: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 120 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| device: [gen4, mg] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| # Same pin as test.yml, for the same reasons. | ||
| - uses: subosito/flutter-action@v2 | ||
| with: | ||
| flutter-version: 3.41.6 | ||
| channel: stable | ||
| cache: true | ||
|
|
||
| - name: Guard — the lock pins sibling commits, and the pins aren't stale | ||
| run: bash .github/scripts/check_sibling_pins.sh | ||
|
|
||
| - name: Install dependencies | ||
| run: flutter pub get | ||
|
|
||
| - name: Soak (${{ matrix.device }}) | ||
| env: | ||
| OPENSTRAP_SOAK: '1' | ||
| SOAK_DEVICE: ${{ matrix.device }} | ||
| SOAK_DAYS: ${{ inputs.days || '30' }} | ||
| SOAK_HISTORY: ${{ inputs.history || '30,180,365,730' }} | ||
| run: flutter test --concurrency=1 --reporter=expanded test/db_growth_soak_test.dart | ||
|
|
||
| - name: Keep the size report | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: db-growth-${{ matrix.device }} | ||
| path: build/soak/db_growth.csv | ||
| if-no-files-found: ignore | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.