Skip to content

Commit

Permalink
refactor: add latency plots and enable production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
karatakis committed Nov 6, 2024
1 parent c2ad51f commit fe60346
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
37 changes: 34 additions & 3 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
<!-- PERFORMANCE_RESULTS_END -->

### 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:

```
Expand Down

0 comments on commit fe60346

Please sign in to comment.