Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7654 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive validation benchmarks for the HotChocolate GraphQL framework. The PR introduces a new benchmark suite to measure validation performance across different schema sizes and query complexities, enabling performance tracking and optimization of the validation pipeline.
Changes:
- Added ValidationBenchmarkBase abstract class to share common setup logic across benchmarks
- Created four new benchmark classes testing validation with different schema/query combinations (many fragments, large schema variations, and extra-large schema)
- Added extensive GraphQL schema and query resource files for benchmark scenarios
- Updated Program.cs to support running all benchmarks and modified OverlappingFieldsMergedBenchmark to remove unused imports
- Added solution file (Benchmarks.slnx) to organize benchmark projects
- Updated project configuration to copy resource files to output directory
Reviewed changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ValidationBenchmarkBase.cs | Base class providing shared setup for loading schemas and documents, with custom scalar handling |
| ManyFragmentsBenchmark.cs | Benchmark for validating queries with many fragments |
| LargeSchema1Benchmark.cs | Benchmark for validating against first large schema variant |
| LargeSchema2Benchmark.cs | Benchmark for validating against second large schema variant |
| ExtraLargeSchema1Benchmark.cs | Benchmark for validating against extra-large schema |
| Program.cs | Updated to use RunAllJoined for executing all benchmarks |
| OverlappingFieldsMergedBenchmark.cs | Cleanup of unused using statements |
| HotChocolate.Validation.Benchmarks.csproj | Added resource file copy configuration |
| Benchmarks.slnx | New solution file organizing benchmark projects |
| resources/*.graphql(s) | GraphQL schema definitions and queries for benchmarking |
| dictionary.txt | Added "Diagnoser" to custom dictionary |
Comments suppressed due to low confidence (2)
src/HotChocolate/Core/benchmarks/Validation.Benchmarks/Program.cs:5
- The Program.cs uses
RunAllJoined(null, args)which is different from the existing pattern in Execution.Abstractions.Benchmarks that usesRun(args). TheRunAllJoinedmethod runs all benchmarks in a single execution, which may not be the intended behavior for benchmarking. Consider using.Run(args)instead to maintain consistency with the existing benchmark pattern and allow selective benchmark execution via command-line arguments.
BenchmarkSwitcher
.FromAssembly(typeof(Program).Assembly)
.RunAllJoined(null, args);
src/HotChocolate/Core/benchmarks/Validation.Benchmarks/ValidationBenchmarkBase.cs:4
- The unused import
Microsoft.Extensions.DependencyInjectionshould be removed as it's not used anywhere in the ValidationBenchmarkBase class.
using Microsoft.Extensions.DependencyInjection;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fusion Gateway Performance ResultsSimple Composite Query
Response Times & Query
query TestQuery {
topProducts(first: 5) {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
}
}
}
}Deep Recursion Query
Response Times & Query
query TestQuery {
users {
id
username
name
reviews {
id
body
product {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
reviews {
id
body
product {
inStock
name
price
shippingEstimate
upc
weight
}
}
}
}
}
}
}
topProducts(first: 5) {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
reviews {
id
body
product {
inStock
name
price
shippingEstimate
upc
weight
}
}
}
}
}
}Variable Batching Throughput
Response Times & Query
query TestQuery($upc: ID!, $price: Long!, $weight: Long!) {
productByUpc(upc: $upc) {
inStock
shippingEstimate(weight: $weight, price: $price)
}
}Variables (5 sets batched per request) [
{ "upc": "1", "price": 899, "weight": 100 },
{ "upc": "2", "price": 1299, "weight": 1000 },
{ "upc": "3", "price": 15, "weight": 20 },
{ "upc": "4", "price": 499, "weight": 100 },
{ "upc": "5", "price": 1299, "weight": 1000 }
]Run 22193791827 • Commit c67ce3e • Thu, 19 Feb 2026 18:48:51 GMT |
Summary of the changes (Less than 80 chars)