mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
[PR #1111] Add BenchmarkDotNet performance benchmarking infrastructure #1541
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/1111
Author: @Copilot
Created: 1/5/2026
Status: 🔄 Open
Base:
master← Head:copilot/add-performance-benchmarking📝 Commits (8)
6125654Initial planaa3a40dAdd BenchmarkDotNet integration with Archive and Reader benchmarks5b1d11bAdd WriteBenchmarks, BaselineComparisonBenchmarks, and comprehensive documentation49f2271Format code with CSharpiere519f61Address code review feedback: fix exception handling and initialization ordera92ce90Fix path validation and add iteration cleanup to prevent file reuse80ac10aMerge latest master branch and resolve conflicts5c4b83eMerge remote-tracking branch 'origin/master' into copilot/add-performance-benchmarking📊 Changes
12 files changed (+688 additions, -50 deletions)
View changed files
📝
.gitignore(+4 -0)📝
Directory.Packages.props(+1 -0)📝
src/SharpCompress/packages.lock.json(+3 -3)➕
tests/SharpCompress.Performance/ArchiveReadBenchmarks.cs(+86 -0)➕
tests/SharpCompress.Performance/BaselineComparisonBenchmarks.cs(+47 -0)➕
tests/SharpCompress.Performance/BenchmarkBase.cs(+37 -0)📝
tests/SharpCompress.Performance/Program.cs(+9 -47)➕
tests/SharpCompress.Performance/README.md(+131 -0)➕
tests/SharpCompress.Performance/ReaderBenchmarks.cs(+88 -0)📝
tests/SharpCompress.Performance/SharpCompress.Performance.csproj(+1 -0)➕
tests/SharpCompress.Performance/WriteBenchmarks.cs(+106 -0)📝
tests/SharpCompress.Performance/packages.lock.json(+175 -0)📄 Description
Performance Benchmarks Implementation - Complete ✅
Successfully integrated BenchmarkDotNet into the SharpCompress.Performance project with comprehensive benchmarking capabilities.
Recent Updates
Implemented Benchmarks
Features
✅ Memory diagnostics with
[MemoryDiagnoser]attribute✅ Baseline comparison support for tracking performance changes
✅ Test archives from existing TestArchives directory
✅ Comprehensive README with usage examples and best practices
✅ BenchmarkDotNet artifacts excluded from git
✅ All code formatted with CSharpier
✅ Proper exception handling with descriptive messages
✅ Path validation to prevent IndexOf returning -1
✅ Iteration cleanup to prevent file reuse affecting measurements
✅ Test files initialized in GlobalSetup to avoid initialization order issues
✅ Compatible with latest master branch changes
Usage Examples
Sample Output
Benchmarks provide detailed metrics including:
See
tests/SharpCompress.Performance/README.mdfor comprehensive documentation.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.