[AspNetCore] Simplify benchmarks and add gRPC#4091
Open
martincostello wants to merge 3 commits intoopen-telemetry:mainfrom
Open
[AspNetCore] Simplify benchmarks and add gRPC#4091martincostello wants to merge 3 commits intoopen-telemetry:mainfrom
martincostello wants to merge 3 commits intoopen-telemetry:mainfrom
Conversation
Add simpler benchmarks for HTTP and gRPC using the ASP.NET Core test server.
Contributor
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.
test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/AspNetCoreBenchmarks.cs
Show resolved
Hide resolved
test/OpenTelemetry.Instrumentation.AspNetCore.Benchmarks/AspNetCoreBenchmarks.cs
Show resolved
Hide resolved
Ensure the metrics pipeline is active.
Update the README and fix the formatting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)