-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add garbage collection operations in reporting #13
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
Conversation
Test Summary190 tests 190 ✅ 0s ⏱️ Results for commit f56ee76. ♻️ This comment has been updated with latest results. |
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.
Pull Request Overview
This PR adds support for reporting garbage collection operations (Gen0, Gen1, Gen2) to the benchmark comparison tool.
- Introduces
CalculateGarbageCollectionOperationsinMetricComparisonto compute GC ops per 1000 iterations. - Extends
ComparerReportwithGen0Collections,Gen1Collections,Gen2Collectionsand updates exporters (Markdown/Console) and command wiring. - Adds comprehensive tests for GC metrics in
MetricComparison, table printing, exporters, and the comparer command.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Models/MetricComparison.cs | New CalculateGarbageCollectionOperations |
| src/Models/ComparerReport.cs | Added Gen0/Gen1/Gen2Collections properties |
| src/Helpers/PrintTable.cs | TableBuilder supports dynamic columns/rows |
| src/Exporters/MarkdownExporter.cs | Dynamically include GC columns in Markdown |
| src/Exporters/ConsoleExporter.cs | Use TableBuilder to include GC columns |
| src/Commands/ComparerCommand.cs | Populate GC metrics in report generation |
| tests/.../MetricComparisonTests.cs | Tests for GC operations calculations |
| tests/.../PrintTableTest.cs | Tests for table formatting |
| tests/.../MarkdownExporterTests.cs | Tests for Markdown output with GC columns |
| tests/.../ConsoleExporterTests.cs | Tests for Console output with GC columns |
| tests/.../ComparerCommandTests.cs | Tests verifying command-generated GC metrics |
Comments suppressed due to low confidence (3)
src/Helpers/PrintTable.cs:134
- The method name
_setColumnWithappears to be a typo; consider renaming it to_setColumnWidthfor clarity.
private void _setColumnWith(int columnIndex, int width)
src/Helpers/PrintTable.cs:20
- Using
params IEnumerable<string>can be confusing and may not match common usage; consider changing the signature toparams string[] columnsorIEnumerable<string> columnsfor clearer intent.
public TableBuilder AddHeader(params IEnumerable<string> columns)
tests/PowerUtils.BenchmarkDotnet.Reporter.Tests/Commands/ComparerCommandTests.cs:667
- [nitpick] The test method name contains duplicate phrases (
Have_Has). Consider renaming it toWhen_Baseline_Has_Value_For_Gen0Collections_Should_Register_Baseline_GCComparisonfor clarity.
public void When_Baseline_Have_Has_Value_For_Gen0Collections_Should_Have_Comparison_Baseline_With_For_Gen0Collections()
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🚀 Stryker report generated 🚀 |
|
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |



Checklist before requesting a review