Skip to content

Commit

Permalink
Update benchmark.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alankritdabral authored May 28, 2024
1 parent 4b41664 commit 1096cb2
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,56 @@ jobs:
- name: Install Stable Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run Cargo Build
run: cargo install rust-script
# - name: Run Cargo Build
# run: cargo install rust-script

- name: Run Cargo Build
run: cargo build --release
# - name: Run Cargo Build
# run: cargo build --release

- name: Run Tailcall
run: |
TAILCALL_LOG_LEVEL=error ./target/release/tailcall start ci-benchmark/benchmark.graphql &
# - name: Run Tailcall
# run: |
# TAILCALL_LOG_LEVEL=error ./target/release/tailcall start ci-benchmark/benchmark.graphql &

- name: Install Wrk
run: |
sudo apt-get install -y wrk
# - name: Install Wrk
# run: |
# sudo apt-get install -y wrk

- name: Run Test Query
run: |
curl -i -X POST -d '{"query": "{posts{title}}"}' http://localhost:8000/graphql -H "Content-Type: application/json"
# - name: Run Test Query
# run: |
# curl -i -X POST -d '{"query": "{posts{title}}"}' http://localhost:8000/graphql -H "Content-Type: application/json"

- name: Warmup Wrk
working-directory: ci-benchmark
run: |
wrk -d 10 -t 4 -c 100 -s wrk.lua http://localhost:8000/graphql
# - name: Warmup Wrk
# working-directory: ci-benchmark
# run: |
# wrk -d 10 -t 4 -c 100 -s wrk.lua http://localhost:8000/graphql

- id: run_wrk
name: Run Wrk
working-directory: ci-benchmark
run: |
wrk -d 30 -t 4 -c 100 -s wrk.lua http://localhost:8000/graphql > wrk-output.txt
# - id: run_wrk
# name: Run Wrk
# working-directory: ci-benchmark
# run: |
# wrk -d 30 -t 4 -c 100 -s wrk.lua http://localhost:8000/graphql > wrk-output.txt

- id: convert_wrk_output_markdown
name: Convert Output to Markdown
working-directory: ci-benchmark
run: |
node wrk-output-to-md.js wrk-output.txt > body.md
- id: cat_md
name: Cat Markdown
working-directory: ci-benchmark
run: |
cat body.md
# - id: convert_wrk_output_markdown
# name: Convert Output to Markdown
# working-directory: ci-benchmark
# run: |
# node wrk-output-to-md.js wrk-output.txt > body.md
# - id: cat_md
# name: Cat Markdown
# working-directory: ci-benchmark
# run: |
# cat body.md

- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
name: body
path: ci-benchmark/body.md
# - name: "Upload Artifact"
# uses: actions/upload-artifact@v4
# with:
# name: body
# path: ci-benchmark/body.md

- name: Convert Bmf
working-directory: ci-benchmark
run: |
rust-script generate_bmf_json.rs wrk-output.txt > results.json
# - name: Convert Bmf
# working-directory: ci-benchmark
# run: |
# rust-script generate_bmf_json.rs wrk-output.txt > results.json

- uses: bencherdev/bencher@main
- name: Push to Bencher.dev
Expand Down

0 comments on commit 1096cb2

Please sign in to comment.