diff --git a/README.md b/README.md index 7fdee2fc4d..7a52ec2f3e 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ The following benchmark measures the "overhead" of loading and resolving a Graph In more complete end-to-end benchmarks, we've measured up to 8x more requests per second and 8x lower p99 latency compared to Apollo Router, which is written in Rust. ```shell -cd v2/pkg/engine +cd v2/pkg/engine/resolve go test -run=nothing -bench=Benchmark_NestedBatchingWithoutChecks -memprofile memprofile.out -benchtime 3s && go tool pprof memprofile.out goos: darwin goarch: arm64 diff --git a/v2/pkg/engine/resolve/resolve_test.go b/v2/pkg/engine/resolve/resolve_test.go index bb90d1b844..44b9f4ce9c 100644 --- a/v2/pkg/engine/resolve/resolve_test.go +++ b/v2/pkg/engine/resolve/resolve_test.go @@ -6258,6 +6258,9 @@ func Benchmark_NestedBatching(b *testing.B) { }, }, }, + Info: &GraphQLResponseInfo{ + OperationType: ast.OperationTypeQuery, + }, } expected := []byte(`{"data":{"topProducts":[{"name":"Table","stock":8,"reviews":[{"body":"Love Table!","author":{"name":"user-1"}},{"body":"Prefer other Table.","author":{"name":"user-2"}}]},{"name":"Couch","stock":2,"reviews":[{"body":"Couch Too expensive.","author":{"name":"user-1"}}]},{"name":"Chair","stock":5,"reviews":[{"body":"Chair Could be better.","author":{"name":"user-2"}}]}]}}`) @@ -6565,6 +6568,9 @@ func Benchmark_NestedBatchingWithoutChecks(b *testing.B) { }, }, }, + Info: &GraphQLResponseInfo{ + OperationType: ast.OperationTypeQuery, + }, } expected := []byte(`{"data":{"topProducts":[{"name":"Table","stock":8,"reviews":[{"body":"Love Table!","author":{"name":"user-1"}},{"body":"Prefer other Table.","author":{"name":"user-2"}}]},{"name":"Couch","stock":2,"reviews":[{"body":"Couch Too expensive.","author":{"name":"user-1"}}]},{"name":"Chair","stock":5,"reviews":[{"body":"Chair Could be better.","author":{"name":"user-2"}}]}]}}`)