From fe60346b26c300f76dc53ace555ce625dbade8fd Mon Sep 17 00:00:00 2001 From: Panagiotis Date: Wed, 6 Nov 2024 22:44:53 +0200 Subject: [PATCH] refactor: add latency plots and enable production mode --- .github/workflows/bench.yml | 37 ++++++++++++++++++++++++++++++++++--- README.md | 10 ++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 347edc5..25532dc 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -43,9 +43,9 @@ jobs: benchmark: if: github.event.head_commit.message != 'Update performance results in README.md' needs: build - runs-on: ubuntu-latest - # runs-on: - # group: benchmarking-runner + # runs-on: ubuntu-latest + runs-on: + group: benchmarking-runner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: @@ -302,6 +302,37 @@ jobs: EOF - name: Create RPS basic plot run: gnuplot -e "file_name='files/rps_default.png'; title_text='RPS Default'" plot_script.gp + - name: Save RPS cached plot data + run: | + cat << 'EOF' > data.dat + # Small Medium Big + Tailcall ${{ fromJson(needs.read.outputs.result).rps.small_tailcall_full_conf }} ${{ fromJson(needs.read.outputs.result).rps.medium_tailcall_full_conf }} ${{ fromJson(needs.read.outputs.result).rps.big__tailcall_full_conf }} + Grafbase ${{ fromJson(needs.read.outputs.result).rps.small_grafbase_cache }} ${{ fromJson(needs.read.outputs.result).rps.medium_grafbase_cache }} ${{ fromJson(needs.read.outputs.result).rps.big__grafbase_cache }} + Wundergraph ${{ fromJson(needs.read.outputs.result).rps.small_wundergraph_default }} ${{ fromJson(needs.read.outputs.result).rps.medium_wundergraph_default }} ${{ fromJson(needs.read.outputs.result).rps.big__wundergraph_default }} + EOF + - name: Create RPS cached plot + run: gnuplot -e "file_name='files/rps_cached.png'; title_text='RPS Cached'" plot_script.gp + - name: Save P95 Latency basic plot data + run: | + cat << 'EOF' > data.dat + # Small Medium Big + Tailcall ${{ fromJson(needs.read.outputs.result).p95.small_tailcall_default }} ${{ fromJson(needs.read.outputs.result).p95.medium_tailcall_default }} ${{ fromJson(needs.read.outputs.result).p95.big_tailcall_default }} + Grafbase ${{ fromJson(needs.read.outputs.result).p95.small_grafbase_default }} ${{ fromJson(needs.read.outputs.result).p95.medium_grafbase_default }} ${{ fromJson(needs.read.outputs.result).p95.big_grafbase_default }} + Wundergraph ${{ fromJson(needs.read.outputs.result).p95.small_wundergraph_no_opt }} ${{ fromJson(needs.read.outputs.result).p95.medium_wundergraph_no_opt }} ${{ fromJson(needs.read.outputs.result).p95.big_wundergraph_no_opt }} + Apollo ${{ fromJson(needs.read.outputs.result).p95.small_apollo_router }} ${{ fromJson(needs.read.outputs.result).p95.medium_apollo_router }} ${{ fromJson(needs.read.outputs.result).p95.big_apollo_router }} + EOF + - name: Create P95 Latency basic plot + run: gnuplot -e "file_name='files/p95_default.png'; title_text='Latency 95% Default'" plot_script.gp + - name: Save P95 Latency cached plot data + run: | + cat << 'EOF' > data.dat + # Small Medium Big + Tailcall ${{ fromJson(needs.read.outputs.result).p95.small_tailcall_full_conf }} ${{ fromJson(needs.read.outputs.result).p95.medium_tailcall_full_conf }} ${{ fromJson(needs.read.outputs.result).p95.big__tailcall_full_conf }} + Grafbase ${{ fromJson(needs.read.outputs.result).p95.small_grafbase_cache }} ${{ fromJson(needs.read.outputs.result).p95.medium_grafbase_cache }} ${{ fromJson(needs.read.outputs.result).p95.big__grafbase_cache }} + Wundergraph ${{ fromJson(needs.read.outputs.result).p95.small_wundergraph_default }} ${{ fromJson(needs.read.outputs.result).p95.medium_wundergraph_default }} ${{ fromJson(needs.read.outputs.result).p95.big__wundergraph_default }} + EOF + - name: Create P95 Latency cached plot + run: gnuplot -e "file_name='files/p95_cached.png'; title_text='Latency 95% Cached'" plot_script.gp - name: Cleanup files run: | rm "results.md" diff --git a/README.md b/README.md index 2a9cdfa..9c7b071 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,16 @@ Explore and compare the performance of the fastest GraphQL federation routers th | [Wundegraph](https://github.com/wundergraph/cosmo) | ✅ | `2,933 RPS` | `0.0394 sec` | +### RPS Plots + +![Requests Per Second: bar plot, default configuration](./files/rps_default.png) +![Requests Per Second: bar plot, cached configuration](./files/rps_cached.png) + +### Latency 95% + +![Latency 95%: bar plot, default configuration](./files/p95_default.png) +![Latency 95%: bar plot, cached configuration](./files/p95_cached.png) + Specifications of the machine used for benchmarking: ```