[AspNetCore] Simplify benchmarks and add gRPC#4091
[AspNetCore] Simplify benchmarks and add gRPC#4091martincostello merged 3 commits intoopen-telemetry:mainfrom
Conversation
Add simpler benchmarks for HTTP and gRPC using the ASP.NET Core test server.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4091 +/- ##
==========================================
- Coverage 72.93% 72.69% -0.24%
==========================================
Files 452 460 +8
Lines 17844 17886 +42
==========================================
- Hits 13014 13003 -11
- Misses 4830 4883 +53 Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR simplifies the ASP.NET Core instrumentation benchmark suite by switching to ASP.NET Core TestServer (to avoid real network calls), consolidating the old duplicated benchmark classes into a single benchmark type, and adding a gRPC benchmark path.
Changes:
- Replaced the old HTTP-only benchmark classes with a single
AspNetCoreBenchmarksbenchmark usingTestServer. - Added gRPC benchmarking support (proto + in-process gRPC service/client).
- Added
Microsoft.AspNetCore.TestHostto central package versions and updated benchmark project dependencies accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/Proto/greet.proto | Adds a small gRPC proto definition used by the new benchmark. |
| test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/Program.cs | Simplifies the benchmark entrypoint using top-level statements and targets the new benchmark assembly. |
| test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks.csproj | Adds protobuf generation + gRPC/TestHost/OpenTelemetry dependencies required by the new benchmark. |
| test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/Instrumentation/AspNetCoreInstrumentationNewBenchmarks.cs | Removes legacy benchmark implementation. |
| test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/Instrumentation/AspNetCoreInstrumentationBenchmarks.cs | Removes legacy benchmark implementation. |
| test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/AspNetCoreBenchmarks.cs | Introduces consolidated HTTP + gRPC benchmark using TestServer. |
| Directory.Packages.props | Adds central package versions for Microsoft.AspNetCore.TestHost across net8/net9/net10 conditions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ensure the metrics pipeline is active.
Update the README and fix the formatting.
Changes
Add simpler benchmarks for HTTP and gRPC using the ASP.NET Core test server extracted from #4090.
Benchmark Results
Merge requirement checklist
Unit tests added/updatedAppropriateCHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)