-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Description
Resource management issues identified where objects implementing IDisposable are not properly disposed.
Issues Identified from PR #565
Disposal Issues
- Program.cs:49:
cancellationTokenSource
not disposed when no longer needed - Risk of resource leaks in command-line application
API Design Issues
- Multiple
out
parameter warnings in regression strategies - While legitimate for returning detailed results, consider if alternative patterns might be cleaner
Affected Files
src/tools/PerfDiff/Program.cs
src/tools/PerfDiff/BDN/Regression/IBenchmarkRegressionStrategy.cs
src/tools/PerfDiff/BDN/Regression/PercentageRegressionStrategy.cs
src/tools/PerfDiff/BDN/Regression/PercentileRegressionStrategy.cs
src/tools/PerfDiff/BDN/Regression/RegressionStrategyHelper.cs
Suggested Solutions
- Implement proper using statements or try-finally blocks for disposable resources
- Consider returning result objects instead of out parameters where appropriate
- Add resource management unit tests
Reference
- Original PR: feat: modularize PerfDiff regression detection, update analyzer reporting, and clarify CI performance documentation #565
- Static analysis: Codacy warnings