-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: Separate match test cases into a testing file * test: Add match offers benchmark * test: Add benchmark GH action * docs: Add benchmarking docs * feat: Add GetResourceOffers query oldest first * feat: Add GetJobOffers query oldest first * fix: Return match result values instead of refs * test: Lift test store helpers to solver package * feat: Matcher retrieve offers oldest first * feat: Add isCheaperOrOlder matching helper * test: Add TestIsCheaperOrOlder unit test * feat: Add pricing and age sorting preferences * test: Add matching and sorting integration test We integrate at the solver to test matcher and store functionality together. * feat: Add service logger to matcher * chore: Add lookup and match decision add error logs * refactor: Move adding match decisions into a helper function * chore: Log matched resource offer decisions count
- Loading branch information
Showing
16 changed files
with
1,093 additions
and
521 deletions.
There are no files selected for viewing
This file contains 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,58 @@ | ||
name: Benchmarks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
deployments: write | ||
contents: write | ||
|
||
jobs: | ||
run-solver-benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install golang | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Run benchmarks | ||
run: ./stack benchmarks-solver | tee assets/benchmark-output.txt | ||
|
||
- name: Download previous benchmark data | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./cache | ||
key: ${{ runner.os }}-benchmark | ||
|
||
- name: Report benchmark results | ||
if: github.event_name == 'pull_request' | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tool: 'go' | ||
output-file-path: assets/benchmark-output.txt | ||
external-data-json-path: ./cache/benchmark-data.json | ||
# Comment when performance degrades >2x | ||
comment-on-alert: true | ||
# Add summary to action run | ||
summary-always: true | ||
auto-push: false | ||
|
||
- name: Publish benchmark results | ||
if: github.event_name == 'push' && github.ref_name == 'main' | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tool: 'go' | ||
output-file-path: assets/benchmark-output.txt | ||
# Add summary to action run | ||
summary-always: true | ||
# Publish gh-pages chart | ||
auto-push: true |
This file contains 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
This file contains 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
This file contains 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
This file contains 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.