-
Notifications
You must be signed in to change notification settings - Fork 510
Add automated performance benchmarks with BenchmarkDotNet #1188
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
+1,203
−48
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2f9b642
Initial plan
Copilot 2541c09
Add BenchmarkDotNet performance benchmarks for all major formats
Copilot ca26292
Add GitHub Actions workflow, baseline results, and documentation for …
Copilot 0848a1b
Apply CSharpier formatting to performance benchmarks
Copilot 7914b7d
Add implementation summary for performance benchmarks
Copilot f2483be
update benchmarkdotnet
adamhathcock d4f1daf
Merge remote-tracking branch 'origin/copilot/add-performance-benchmar…
adamhathcock 2fa8196
Replace bash scripts with C# build targets for benchmark display and …
Copilot bbc664d
Add generate-baseline build target and JetBrains profiler support
Copilot 118fbbe
Implement actual benchmark comparison logic with regression detection
Copilot 6eec6fa
simplify the results to compare
adamhathcock c96acf1
updated results?
adamhathcock 2860896
Merge remote-tracking branch 'origin/master' into copilot/add-perform…
adamhathcock e85752c
reget results and change threshold to 25 %
adamhathcock 87cab8e
updating baseline to be what github actions do
adamhathcock 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,50 @@ | ||
| name: Performance Benchmarks | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
| - 'release' | ||
| pull_request: | ||
| branches: | ||
| - 'master' | ||
| - 'release' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| benchmark: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 10.0.x | ||
|
|
||
| - name: Build Performance Project | ||
| run: dotnet build tests/SharpCompress.Performance/SharpCompress.Performance.csproj --configuration Release | ||
|
|
||
| - name: Run Benchmarks | ||
| run: dotnet run --project tests/SharpCompress.Performance/SharpCompress.Performance.csproj --configuration Release --no-build -- --filter "*" --exporters json markdown --artifacts benchmark-results | ||
| continue-on-error: true | ||
|
|
||
| - name: Display Benchmark Results | ||
| if: always() | ||
| run: dotnet run --project build/build.csproj -- display-benchmark-results | ||
|
|
||
| - name: Compare with Baseline | ||
| if: always() | ||
| run: dotnet run --project build/build.csproj -- compare-benchmark-results | ||
|
|
||
| - name: Upload Benchmark Results | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: benchmark-results | ||
| path: benchmark-results/ | ||
adamhathcock marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continue-on-error: trueon the benchmark run step will mask benchmark execution failures (including crashes) and still produce a “successful” workflow run. If benchmark failures should be visible/actionable, removecontinue-on-erroror make the comparison step fail the job when results are missing/regressions are detected.