Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 9227d6d

Browse files
committed
revert #332
1 parent e8247a9 commit 9227d6d

11 files changed

+69
-124
lines changed

.github/workflows/bench.yml

Lines changed: 9 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,38 @@
11
name: "Run benchmark"
2+
23
on:
34
pull_request_target:
45
types: [assigned, opened, synchronize, reopened, edited]
56
push:
67
branches:
78
- main
9+
810
permissions:
911
contents: write
1012
pull-requests: write
1113
issues: write
14+
1215
jobs:
13-
benchmark:
16+
build:
1417
runs-on: benchmarking-runner
18+
if: github.event.head_commit.message != 'Update performance results in README.md'
1519
env:
1620
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
strategy:
18-
matrix:
19-
service:
20-
[
21-
apollo_server,
22-
caliban,
23-
netflix_dgs,
24-
gqlgen,
25-
tailcall,
26-
async_graphql,
27-
hasura,
28-
graphql_jit,
29-
]
3021
steps:
3122
- name: Checkout (GitHub)
3223
uses: actions/checkout@v4
3324
with:
3425
token: ${{ secrets.GITHUB_TOKEN }}
3526
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
3627

37-
- name: Build devcontainer and run setup and benchmark
28+
- name: Build devcontainer and run benchmarks
3829
uses: devcontainers/[email protected]
3930
with:
4031
imageName: graphql-benchmarks
4132
push: never
4233
runCmd: |
43-
bash ./graphql/${{ matrix.service }}/setup.sh
44-
bash run_benchmarks.sh ${{ matrix.service }}
45-
46-
- name: List benchmark files
47-
run: |
48-
ls -la bench*.txt || echo "No matching files found"
49-
50-
- name: Upload benchmark results
51-
uses: actions/upload-artifact@v3
52-
with:
53-
name: benchmark-results
54-
path: bench*.txt
55-
56-
analyze:
57-
needs: benchmark
58-
runs-on: benchmarking-runner
59-
steps:
60-
- name: Checkout (GitHub)
61-
uses: actions/checkout@v4
62-
63-
- name: Download all benchmark results
64-
uses: actions/download-artifact@v3
65-
with:
66-
name: benchmark-results
67-
path: .
68-
69-
- name: List downloaded artifacts
70-
run: ls -la bench*.txt || echo "No matching files found"
71-
72-
- name: Analyze results
73-
run: |
74-
bash run_analyze_script.sh
34+
bash ./setup.sh
35+
bash ./run_benchmarks.sh
7536
7637
- name: Print benchmark results
7738
run: cat ./results.md
@@ -90,4 +51,4 @@ jobs:
9051
with:
9152
branch: main
9253
commit_author: Author <[email protected]>
93-
commit_message: "[ci skip] update performance results in README.md"
54+
commit_message: "Update performance results in README.md"

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Explore and compare the performance of the fastest GraphQL frameworks through ou
2828

2929
## Introduction
3030

31-
This document presents a comparative analysis of several renowned GraphQL solutions. Dive deep into the performance metrics, and get insights into their throughput and latency.
31+
This document presents a comparative analysis of several renowned GraphQL frameworks. Dive deep into the performance metrics, and get insights into their throughput and latency.
3232

3333
> **NOTE:** This is a work in progress suite of benchmarks, and we would appreciate help from the community to add more frameworks or tune the existing ones for better performance.
3434
@@ -51,32 +51,32 @@ Get started with the benchmarks:
5151
| Query | Server | Requests/sec | Latency (ms) | Relative |
5252
|-------:|--------:|--------------:|--------------:|---------:|
5353
| 1 | `{ posts { id userId title user { id name email }}}` |
54-
|| [async-graphql] | `10,412.00` | `147.99` | `17.58x` |
55-
|| [Netflix DGS] | `9,907.41` | `175.64` | `16.72x` |
56-
|| [GraphQL JIT] | `9,880.01` | `242.40` | `16.68x` |
57-
|| [Gqlgen] | `1,448.80` | `79.74` | `2.45x` |
58-
|| [Hasura] | `1,268.31` | `87.46` | `2.14x` |
59-
|| [Apollo GraphQL] | `1,248.48` | `166.23` | `2.11x` |
60-
|| [Caliban] | `757.51` | `257.01` | `1.28x` |
61-
|| [Tailcall] | `592.42` | `227.60` | `1.00x` |
54+
|| [Tailcall] | `29,267.60` | `3.40` | `267.10x` |
55+
|| [async-graphql] | `1,740.18` | `57.69` | `15.88x` |
56+
|| [Caliban] | `1,569.42` | `63.36` | `14.32x` |
57+
|| [GraphQL JIT] | `1,336.41` | `74.51` | `12.20x` |
58+
|| [Gqlgen] | `747.49` | `132.68` | `6.82x` |
59+
|| [Netflix DGS] | `352.99` | `194.51` | `3.22x` |
60+
|| [Apollo GraphQL] | `266.96` | `368.47` | `2.44x` |
61+
|| [Hasura] | `109.58` | `549.59` | `1.00x` |
6262
| 2 | `{ posts { title }}` |
63-
|| [async-graphql] | `23,335.10` | `24.29` | `18.33x` |
64-
|| [Netflix DGS] | `20,600.60` | `44.12` | `16.18x` |
65-
|| [GraphQL JIT] | `20,451.20` | `62.80` | `16.06x` |
66-
|| [Gqlgen] | `7,036.34` | `23.19` | `5.53x` |
67-
|| [Apollo GraphQL] | `6,829.44` | `27.47` | `5.36x` |
68-
|| [Hasura] | `4,453.10` | `44.00` | `3.50x` |
69-
|| [Caliban] | `1,462.79` | `78.87` | `1.15x` |
70-
|| [Tailcall] | `1,273.29` | `86.31` | `1.00x` |
63+
|| [Tailcall] | `58,892.60` | `1.69` | `67.80x` |
64+
|| [Caliban] | `9,095.25` | `11.36` | `10.47x` |
65+
|| [async-graphql] | `9,013.56` | `11.22` | `10.38x` |
66+
|| [Gqlgen] | `2,150.46` | `48.27` | `2.48x` |
67+
|| [Apollo GraphQL] | `1,790.51` | `55.78` | `2.06x` |
68+
|| [Netflix DGS] | `1,577.33` | `70.02` | `1.82x` |
69+
|| [GraphQL JIT] | `1,355.90` | `73.65` | `1.56x` |
70+
|| [Hasura] | `868.64` | `114.88` | `1.00x` |
7171
| 3 | `{ greet }` |
72-
|| [Gqlgen] | `53,539.90` | `2.78` | `10.09x` |
73-
|| [Apollo GraphQL] | `40,331.30` | `5.49` | `7.60x` |
74-
|| [Hasura] | `39,528.60` | `8.54` | `7.45x` |
75-
|| [async-graphql] | `38,009.10` | `5.71` | `7.16x` |
76-
|| [Netflix DGS] | `25,211.90` | `9.83` | `4.75x` |
77-
|| [GraphQL JIT] | `23,492.70` | `18.38` | `4.43x` |
78-
|| [Caliban] | `18,230.80` | `20.44` | `3.43x` |
79-
|| [Tailcall] | `5,307.93` | `24.38` | `1.00x` |
72+
|| [Caliban] | `67,030.40` | `1.08` | `25.98x` |
73+
|| [Tailcall] | `58,359.30` | `1.73` | `22.61x` |
74+
|| [async-graphql] | `47,894.60` | `2.12` | `18.56x` |
75+
|| [Gqlgen] | `47,153.70` | `5.18` | `18.27x` |
76+
|| [Netflix DGS] | `8,188.33` | `15.04` | `3.17x` |
77+
|| [Apollo GraphQL] | `8,021.30` | `12.65` | `3.11x` |
78+
|| [GraphQL JIT] | `5,168.90` | `19.32` | `2.00x` |
79+
|| [Hasura] | `2,580.56` | `38.79` | `1.00x` |
8080

8181
<!-- PERFORMANCE_RESULTS_END -->
8282

analyze.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash
22

3-
# Install gnuplot
4-
sudo apt-get update && sudo apt-get install -y gnuplot
5-
63
function extractMetric() {
74
local file="$1"
85
local metric="$2"
@@ -164,4 +161,4 @@ mv $latencyHistogramFile assets/
164161
# Delete the result TXT files
165162
for file in "${resultFiles[@]}"; do
166163
rm "$file"
167-
done
164+
done

assets/latency_histogram1.png

-97 Bytes
Loading

assets/latency_histogram2.png

972 Bytes
Loading

assets/latency_histogram3.png

2.16 KB
Loading

assets/req_sec_histogram1.png

1.25 KB
Loading

assets/req_sec_histogram2.png

1.1 KB
Loading

assets/req_sec_histogram3.png

1.65 KB
Loading

results.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@
33
| Query | Server | Requests/sec | Latency (ms) | Relative |
44
|-------:|--------:|--------------:|--------------:|---------:|
55
| 1 | `{ posts { id userId title user { id name email }}}` |
6-
|| [async-graphql] | `10,412.00` | `147.99` | `17.58x` |
7-
|| [Netflix DGS] | `9,907.41` | `175.64` | `16.72x` |
8-
|| [GraphQL JIT] | `9,880.01` | `242.40` | `16.68x` |
9-
|| [Gqlgen] | `1,448.80` | `79.74` | `2.45x` |
10-
|| [Hasura] | `1,268.31` | `87.46` | `2.14x` |
11-
|| [Apollo GraphQL] | `1,248.48` | `166.23` | `2.11x` |
12-
|| [Caliban] | `757.51` | `257.01` | `1.28x` |
13-
|| [Tailcall] | `592.42` | `227.60` | `1.00x` |
6+
|| [Tailcall] | `29,267.60` | `3.40` | `267.10x` |
7+
|| [async-graphql] | `1,740.18` | `57.69` | `15.88x` |
8+
|| [Caliban] | `1,569.42` | `63.36` | `14.32x` |
9+
|| [GraphQL JIT] | `1,336.41` | `74.51` | `12.20x` |
10+
|| [Gqlgen] | `747.49` | `132.68` | `6.82x` |
11+
|| [Netflix DGS] | `352.99` | `194.51` | `3.22x` |
12+
|| [Apollo GraphQL] | `266.96` | `368.47` | `2.44x` |
13+
|| [Hasura] | `109.58` | `549.59` | `1.00x` |
1414
| 2 | `{ posts { title }}` |
15-
|| [async-graphql] | `23,335.10` | `24.29` | `18.33x` |
16-
|| [Netflix DGS] | `20,600.60` | `44.12` | `16.18x` |
17-
|| [GraphQL JIT] | `20,451.20` | `62.80` | `16.06x` |
18-
|| [Gqlgen] | `7,036.34` | `23.19` | `5.53x` |
19-
|| [Apollo GraphQL] | `6,829.44` | `27.47` | `5.36x` |
20-
|| [Hasura] | `4,453.10` | `44.00` | `3.50x` |
21-
|| [Caliban] | `1,462.79` | `78.87` | `1.15x` |
22-
|| [Tailcall] | `1,273.29` | `86.31` | `1.00x` |
15+
|| [Tailcall] | `58,892.60` | `1.69` | `67.80x` |
16+
|| [Caliban] | `9,095.25` | `11.36` | `10.47x` |
17+
|| [async-graphql] | `9,013.56` | `11.22` | `10.38x` |
18+
|| [Gqlgen] | `2,150.46` | `48.27` | `2.48x` |
19+
|| [Apollo GraphQL] | `1,790.51` | `55.78` | `2.06x` |
20+
|| [Netflix DGS] | `1,577.33` | `70.02` | `1.82x` |
21+
|| [GraphQL JIT] | `1,355.90` | `73.65` | `1.56x` |
22+
|| [Hasura] | `868.64` | `114.88` | `1.00x` |
2323
| 3 | `{ greet }` |
24-
|| [Gqlgen] | `53,539.90` | `2.78` | `10.09x` |
25-
|| [Apollo GraphQL] | `40,331.30` | `5.49` | `7.60x` |
26-
|| [Hasura] | `39,528.60` | `8.54` | `7.45x` |
27-
|| [async-graphql] | `38,009.10` | `5.71` | `7.16x` |
28-
|| [Netflix DGS] | `25,211.90` | `9.83` | `4.75x` |
29-
|| [GraphQL JIT] | `23,492.70` | `18.38` | `4.43x` |
30-
|| [Caliban] | `18,230.80` | `20.44` | `3.43x` |
31-
|| [Tailcall] | `5,307.93` | `24.38` | `1.00x` |
24+
|| [Caliban] | `67,030.40` | `1.08` | `25.98x` |
25+
|| [Tailcall] | `58,359.30` | `1.73` | `22.61x` |
26+
|| [async-graphql] | `47,894.60` | `2.12` | `18.56x` |
27+
|| [Gqlgen] | `47,153.70` | `5.18` | `18.27x` |
28+
|| [Netflix DGS] | `8,188.33` | `15.04` | `3.17x` |
29+
|| [Apollo GraphQL] | `8,021.30` | `12.65` | `3.11x` |
30+
|| [GraphQL JIT] | `5,168.90` | `19.32` | `2.00x` |
31+
|| [Hasura] | `2,580.56` | `38.79` | `1.00x` |
3232

3333
<!-- PERFORMANCE_RESULTS_END -->

0 commit comments

Comments
 (0)