Skip to content

Commit d1c21c1

Browse files
enisdenjogithub-actions
andauthored
Benchmark Hive Router Query Planner in Hive Gateway (#841)
Co-authored-by: github-actions <[email protected]>
1 parent 8b9aa24 commit d1c21c1

22 files changed

+3379
-4289
lines changed

.github/workflows/benchmark.template.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ on:
3131
fork:
3232
type: number
3333
required: true
34+
waitForUrl:
35+
type: string
3436

3537
jobs:
3638
test:
@@ -39,7 +41,7 @@ jobs:
3941
steps:
4042
- name: checkout
4143
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
42-
44+
4345
- name: setup node
4446
uses: the-guild-org/shared-config/setup@v1
4547
with:
@@ -53,7 +55,7 @@ jobs:
5355
override: true
5456

5557
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
56-
58+
5759
- name: run subgraphs
5860
run: |
5961
make run-subgraphs &
@@ -69,7 +71,7 @@ jobs:
6971
- name: configure eqemu
7072
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
7173
with:
72-
platforms: 'linux/arm64,linux/amd64'
74+
platforms: "linux/arm64,linux/amd64"
7375

7476
- name: configure docker buildx
7577
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
@@ -99,6 +101,7 @@ jobs:
99101
MEM_LIMIT: ${{ inputs.memoryLimit }}
100102
CPU_LIMIT: ${{ inputs.cpuLimit }}
101103
FORK: ${{ inputs.fork }}
104+
WAIT_FOR_URL: ${{ inputs.waitForUrl }}
102105

103106
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
104107
if: always()

.github/workflows/federation-v1.workflow.yaml

Lines changed: 73 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
workflow_dispatch: {}
55

66
concurrency:
7-
group: federation-${{ github.ref }}
7+
# we group by event name because we dont want to cancel workflow dispatch runs on pr commits
8+
group: federation-${{ github.ref }}-${{ github.event_name }}
89
cancel-in-progress: true
910

1011
jobs:
@@ -21,7 +22,7 @@ jobs:
2122
- apollo-gateway
2223
- apollo-router
2324
- hive-gateway
24-
- hive-gateway-bun
25+
- hive-gateway-router-runtime
2526
- hive-router
2627
- cosmo
2728
- grafbase
@@ -36,6 +37,7 @@ jobs:
3637
fork: 2
3738
memoryLimit: 6gb
3839
mode: constant
40+
waitForUrl: ${{ startsWith(matrix.directory, 'hive-gateway') && 'http://localhost:4000/healthcheck' || '' }}
3941

4042
constant-vus-over-time-report:
4143
needs: constant-vus-over-time
@@ -44,73 +46,73 @@ jobs:
4446
with:
4547
scenarioName: constant-vus-over-time
4648

47-
constant-vus-subgraphs-delay:
48-
needs:
49-
- decide-runner
50-
strategy:
51-
fail-fast: false
52-
matrix:
53-
directory:
54-
- apollo-gateway
55-
- apollo-router
56-
- hive-gateway
57-
- hive-gateway-bun
58-
- hive-router
59-
- cosmo
60-
- grafbase
61-
uses: ./.github/workflows/benchmark.template.yaml
62-
with:
63-
gateway: ${{ matrix.directory }}
64-
vu: 50
65-
time: ${{ github.event_name == 'pull_request' && '30s' || '60s' }}
66-
scenarioName: constant-vus-subgraphs-delay
67-
runner: ${{ needs.decide-runner.outputs.runner }}
68-
cpuLimit: 3
69-
fork: 2
70-
memoryLimit: 6gb
71-
subgraphDelay: 50
72-
mode: constant
73-
74-
constant-vus-subgraphs-delay-report:
75-
needs: constant-vus-subgraphs-delay
76-
uses: ./.github/workflows/report.template.yaml
77-
secrets: inherit
78-
with:
79-
scenarioName: constant-vus-subgraphs-delay
80-
81-
constant-vus-subgraphs-delay-resources:
82-
needs:
83-
- decide-runner
84-
strategy:
85-
fail-fast: false
86-
matrix:
87-
directory:
88-
- apollo-gateway
89-
- apollo-router
90-
- hive-gateway
91-
- hive-gateway-bun
92-
- hive-router
93-
- cosmo
94-
- grafbase
95-
uses: ./.github/workflows/benchmark.template.yaml
96-
with:
97-
gateway: ${{ matrix.directory }}
98-
vu: 50
99-
time: ${{ github.event_name == 'pull_request' && '30s' || '60s' }}
100-
scenarioName: constant-vus-subgraphs-delay-resources
101-
runner: ${{ needs.decide-runner.outputs.runner }}
102-
cpuLimit: 4
103-
fork: 3
104-
memoryLimit: 8gb
105-
subgraphDelay: 50
106-
mode: constant
107-
108-
constant-vus-subgraphs-delay-resources-report:
109-
needs: constant-vus-subgraphs-delay-resources
110-
uses: ./.github/workflows/report.template.yaml
111-
secrets: inherit
112-
with:
113-
scenarioName: constant-vus-subgraphs-delay-resources
49+
# TODO: do we need the delay scenarios?
50+
# constant-vus-subgraphs-delay:
51+
# needs:
52+
# - decide-runner
53+
# strategy:
54+
# fail-fast: false
55+
# matrix:
56+
# directory:
57+
# - apollo-gateway
58+
# - apollo-router
59+
# - hive-gateway
60+
# - hive-gateway-router-runtime
61+
# - hive-router
62+
# - cosmo
63+
# - grafbase
64+
# uses: ./.github/workflows/benchmark.template.yaml
65+
# with:
66+
# gateway: ${{ matrix.directory }}
67+
# vu: 50
68+
# time: ${{ github.event_name == 'pull_request' && '30s' || '60s' }}
69+
# scenarioName: constant-vus-subgraphs-delay
70+
# runner: ${{ needs.decide-runner.outputs.runner }}
71+
# cpuLimit: 3
72+
# fork: 2
73+
# memoryLimit: 6gb
74+
# subgraphDelay: 50
75+
# mode: constant
76+
# waitForUrl: ${{ startsWith(matrix.directory, 'hive-gateway') && 'http://localhost:4000/healthcheck' || '' }}
77+
# constant-vus-subgraphs-delay-report:
78+
# needs: constant-vus-subgraphs-delay
79+
# uses: ./.github/workflows/report.template.yaml
80+
# secrets: inherit
81+
# with:
82+
# scenarioName: constant-vus-subgraphs-delay
83+
# constant-vus-subgraphs-delay-resources:
84+
# needs:
85+
# - decide-runner
86+
# strategy:
87+
# fail-fast: false
88+
# matrix:
89+
# directory:
90+
# - apollo-gateway
91+
# - apollo-router
92+
# - hive-gateway
93+
# - hive-gateway-router-runtime
94+
# - hive-router
95+
# - cosmo
96+
# - grafbase
97+
# uses: ./.github/workflows/benchmark.template.yaml
98+
# with:
99+
# gateway: ${{ matrix.directory }}
100+
# vu: 50
101+
# time: ${{ github.event_name == 'pull_request' && '30s' || '60s' }}
102+
# scenarioName: constant-vus-subgraphs-delay-resources
103+
# runner: ${{ needs.decide-runner.outputs.runner }}
104+
# cpuLimit: 4
105+
# fork: 3
106+
# memoryLimit: 8gb
107+
# subgraphDelay: 50
108+
# mode: constant
109+
# waitForUrl: ${{ startsWith(matrix.directory, 'hive-gateway') && 'http://localhost:4000/healthcheck' || '' }}
110+
# constant-vus-subgraphs-delay-resources-report:
111+
# needs: constant-vus-subgraphs-delay-resources
112+
# uses: ./.github/workflows/report.template.yaml
113+
# secrets: inherit
114+
# with:
115+
# scenarioName: constant-vus-subgraphs-delay-resources
114116

115117
ramping-vus:
116118
needs:
@@ -122,7 +124,7 @@ jobs:
122124
- apollo-gateway
123125
- apollo-router
124126
- hive-gateway
125-
- hive-gateway-bun
127+
- hive-gateway-router-runtime
126128
- hive-router
127129
- cosmo
128130
- grafbase
@@ -137,6 +139,7 @@ jobs:
137139
fork: 3
138140
memoryLimit: 8gb
139141
mode: stress
142+
waitForUrl: ${{ startsWith(matrix.directory, 'hive-gateway') && 'http://localhost:4000/healthcheck' || '' }}
140143

141144
ramping-vus-report:
142145
needs: ramping-vus

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The benchmark uses Unix-specific tools and commands that are not available on Wi
9191
```bash
9292
make test gateway=<gateway_name> mode=<constant|stress>
9393
```
94-
Replace `<gateway_name>` with one of: `apollo-router`, `cosmo`, `grafbase`, `hive-gateway`, `hive-gateway-bun`, or `hive-router`.
94+
Replace `<gateway_name>` with one of: `apollo-router`, `cosmo`, `grafbase`, `hive-gateway`, `hive-gateway-bun`, `hive-gateway-router-runtime`, `hive-gateway-router-runtime-bun`, or `hive-router`.
9595

9696
Examples:
9797
```bash

0 commit comments

Comments
 (0)