chore: move Benchmarks for Sentry.Extensions.Logging into separate project#5146
Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
|
|
||
| <Import Project="..\Directory.Build.props" /> | ||
|
|
||
| <!-- Never use Sentry CLI for benchmark projects. --> |
There was a problem hiding this comment.
note: remove redundant comment
<UseSentryCLI>false</UseSentryCLI> was removed via 91b22a9#diff-f431a929d80ac5e052346ee209d3600c6f7385325f3811b74dbba9bf66c21054L7, but the comment remained.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5146 +/- ##
=======================================
Coverage 74.07% 74.07%
=======================================
Files 501 501
Lines 18111 18111
Branches 3521 3521
=======================================
Hits 13415 13415
Misses 3837 3837
Partials 859 859 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>$(PreviousTfm)</TargetFramework> | ||
| <IsPackable>false</IsPackable> |
There was a problem hiding this comment.
note: removing, as already declared in "parent" Directory.Build.props
|
|
||
| namespace Sentry.Extensions.Logging.Benchmarks; | ||
|
|
||
| internal class Program |
There was a problem hiding this comment.
thought: code duplication
This file pretty much is a duplicate from the existing benchmarks/Sentry.Benchmarks/Program.cs, except for the namespace ... which we could argue is fine to keep in the default namespace of the project when using Top-Level-Statements instead.
Should we have more Benchmark-Projects in the future, we could have a single .cs file, that we <Compile Include="..." /> across all projects.
Or we do that right away already.
Summary
Move the Benchmark for
Sentry.Extensions.Logginginto a newSentry.Extensions.Logging.Benchmarksproject.Remarks
In #4308, I broke the
SentryCore.slnffiltered solution, by adding a dependency toSentry.Extensions.Loggingin theSentry.Benchmarksproject.See eadf5f2#diff-a68c64a5b74a24eb0d8d7d04aeb893acd2358768b2e0efe3a747d79199a0bea1R17.
Fixing this problem (without pulling in a bunch of projects into
SentryCore.slnf) by separating the Benchmarks forMicrosoft.Extensions.Logginginto a new separate Benchmarking project.This structure also now mimics
/tests/, where we have one Test-Project per Project-Under-Test.