Skip to content

Conversation

@Shane32
Copy link

@Shane32 Shane32 commented Dec 21, 2025

This PR contains the following changes:

  1. Adds GraphQL.NET benchmarking (requires .NET 10)
  2. Updates the go benchmark to properly terminate after testing is complete

Without updating the go benchmark bootstrapper, the go server is not shut down after it is run. This causes any tests run after the go server has started to be run against the go server rather than the proper server.

The same issue may exist for rust and bun (they also use exec instead of spawn), but I was unable to easily get those benchmarks running on my Windows PC.

// Build the binary
try {
console.log("Building Go binary...");
execSync(`go build -o target/${binaryName} .`, { cwd, stdio: "inherit" });

This comment was marked as outdated.

@Shane32
Copy link
Author

Shane32 commented Dec 21, 2025

duration: 60.32s
connections: 100
pipelining: 5

┌─────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────┐
│ Server                                                  │ Requests/s │ Latency │ Throughput/Mb │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ dotnet-graphql                                          │ 48034.7    │ 9.96    │ 313.70        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ go-graphql                                              │ 18644.5    │ 26.32   │ 109.58        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+async                                      │ 18253.9    │ 26.89   │ 5.05          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+graphql-jit+type-graphql                   │ 18161.5    │ 27.02   │ 5.02          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http                                            │ 18158.0    │ 27.03   │ 5.02          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+async-middleware                           │ 18139.2    │ 27.07   │ 5.02          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+graphql-compose                            │ 18113.2    │ 27.10   │ 5.01          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+type-graphql                               │ 17962.3    │ 27.34   │ 4.97          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+middleware                                 │ 17837.5    │ 27.53   │ 4.93          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+graphql-jit                                │ 17792.8    │ 27.59   │ 4.92          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-compose+async                                   │ 17780.9    │ 27.62   │ 4.92          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http+graphql-jit+graphql-compose                │ 17708.2    │ 27.72   │ 4.90          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-schema+async                                     │ 17501.9    │ 28.07   │ 4.84          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ core-graphql-jit-str                                    │ 15737.4    │ 31.26   │ 106.51        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ benzene-jit-http                                        │ 15293.7    │ 32.19   │ 104.25        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ core-graphql-jit-buf                                    │ 15063.6    │ 32.68   │ 101.95        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ mercurius+graphql-jit                                   │ 14807.9    │ 33.26   │ 100.90        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http-dd-trace-no-plugin                         │ 14653.5    │ 33.62   │ 4.05          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ core-graphql-jit-buf-fjs                                │ 14367.9    │ 34.30   │ 97.24         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ fastify-REST                                            │ 13882.7    │ 35.51   │ 127.92        │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ mercurius+graphql-jit+type-graphql                      │ 10697.9    │ 46.22   │ 72.89         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ mercurius+graphql-jit+otel-instrumentation              │ 8566.2     │ 57.86   │ 58.37         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ benzene-http                                            │ 8540.7     │ 58.02   │ 58.22         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ express-REST                                            │ 8442.2     │ 58.70   │ 78.33         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ mercurius+graphql-compose                               │ 8261.6     │ 60.00   │ 56.29         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ mercurius                                               │ 8237.7     │ 60.18   │ 56.13         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-api-koa+graphql-jit                             │ 7610.9     │ 65.16   │ 51.80         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http-dd-trace-less                              │ 7281.6     │ 68.14   │ 2.01          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-http-dd-trace                                   │ 7217.9     │ 68.73   │ 2.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ yoga-graphql                                            │ 7090.1     │ 69.98   │ 48.30         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-as-integrations-fastify                          │ 5396.5     │ 92.10   │ 36.90         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ graphql-api-koa                                         │ 5395.9     │ 92.10   │ 36.72         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-as-integrations-fastify+graphql-jit              │ 5131.6     │ 96.86   │ 35.09         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-as-integrations-fastify+graphql-jit+type-graphql │ 4859.5     │ 102.32  │ 33.23         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-as-koa-integrations+graphql-jit+type-graphql     │ 4292.3     │ 115.89  │ 29.53         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-server-express-tracing                           │ 3548.1     │ 140.30  │ 24.59         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-server-express                                   │ 3545.3     │ 140.40  │ 24.57         │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ apollo-opentracing                                      │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ bun-yoga-jit                                            │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ bun-yoga                                                │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ express-gql                                             │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ fastify-express-graphql-jit                             │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ fastify-express-graphql-typed-jit                       │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ fastify-express-grapql-typed                            │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ rust-graphql                                            │ 0.0        │ 0.00    │ 0.00          │
├─────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────┤
│ uWebSockets-graphql+jit                                 │ 0.0        │ 0.00    │ 0.00          │
└─────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant