Skip to content

Upcoming Release Changes #5897

Upcoming Release Changes

Upcoming Release Changes #5897

Workflow file for this run

name: Benchmark
env:
NODE_NO_WARNINGS: true
CI: true
on:
pull_request: {}
workflow_dispatch: {}
jobs:
federation-benchmark:
name: Federation Benchmark with ${{matrix.products_size}} Products
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
products_size: [3, 10, 50, 100, 1000]
steps:
- name: Checkout Master
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
- name: Build packages
run: yarn build
- name: Setup K6
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
sudo apt-get update
sudo apt-get install k6=0.37.0
- name: GraphQL API
working-directory: ./benchmark/federation
run: |
yarn start &
yarn wait-on tcp:3000
env:
PRODUCTS_SIZE: ${{matrix.products_size}}
- name: Federation
run: k6 -e ENDPOINT=federation run --out json=federation.json benchmark/federation/k6.js
- name: Stitching
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command:
k6 -e ENDPOINT=stitching -e PRODUCTS_SIZE=${{matrix.products_size}} -e GITHUB_PR=${{
github.event.number }} -e GITHUB_SHA=${{ github.sha }} -e
GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}} run --out json=stitching.json
benchmark/federation/k6.js
- name: Monolith
run: k6 -e ENDPOINT=monolith run --out json=monolith.json benchmark/federation/k6.js
- name: Compare
run:
node benchmark/compare monolith:monolith.json federation:federation.json
stitching:stitching.json