Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Dec 15, 2023
1 parent c317dbe commit 66439fa
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 43 deletions.
66 changes: 23 additions & 43 deletions .github/workflows/qe-perf.yml
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
paths-ignore:
- ".github/**"
- "!.github/workflows/wasm-perf.yml"
- "!.github/workflows/qe-perf.yml"
- ".buildkite/**"
- "*.md"
- "LICENSE"
Expand All @@ -15,49 +15,29 @@ jobs:
name: Run benchmarks
runs-on: ubuntu-latest
outputs:
results: ${{ steps.bench.outputs.stdout }}
steps:
- name: Checkout PR branch
uses: actions/checkout@v4

- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

- name: "Setup pnpm"
uses: pnpm/action-setup@v2
with:
version: 8

- name: "Get pnpm store directory"
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: "Login to Docker Hub"
uses: docker/login-action@v3
continue-on-error: true
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: "${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}"
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: dtolnay/rust-toolchain@stable

- name: Install wasm-pack
run: cargo install wasm-pack
steps:
- name: Run benchmarks
id: bench
run: |
echo <<EOF
cpu: Apple M1 Pro
runtime: node v18.17.0 (arm64-darwin)
- name: Setup benchmark
run: make setup-pg-bench
benchmark time (avg) (min … max) p75 p99 p995
-------------------------------------------------------------- -----------------------------
• movies.findMany() (all - 25000)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline 129.59 µs/iter (115.33 µs … 881.38 µs) 129.5 µs 171.71 µs 302.33 µs
Web Assembly: Latest 138.29 µs/iter (121.58 µs … 2.29 ms) 137.71 µs 180.67 µs 199.83 µs
Web Assembly: Current 1.05 ms/iter (794.04 µs … 1.93 ms) 1.21 ms 1.62 ms 1.8 ms
Node API: Current 2.34 ms/iter (1.98 ms … 2.94 ms) 2.42 ms 2.83 ms 2.89 ms
- name: Run benchmarks
id: bench
run: |
make run-bench
summary for movies.findMany() (all - 25000)
Web Assembly: Current
8.1x slower than Web Assembly: Baseline
7.59x slower than Web Assembly: Latest
2.23x faster than Node API: Current
EOF
report:
name: Report benchmarks
Expand All @@ -83,6 +63,6 @@ jobs:
### Query engine benchmark results
```sh
${{ needs.run-benchmarks.outputs.results}}
${{ needs.run-benchmarks.steps.bench.outputs.stdout }}
```
edit-mode: replace
18 changes: 18 additions & 0 deletions out.txt
@@ -0,0 +1,18 @@
query-engine/driver-adapters/executor/script/bench.sh
cpu: Apple M1 Pro
runtime: node v18.17.0 (arm64-darwin)

benchmark time (avg) (min … max) p75 p99 p995
-------------------------------------------------------------- -----------------------------
• movies.findMany() (all - 25000)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline 129.59 µs/iter (115.33 µs … 881.38 µs) 129.5 µs 171.71 µs 302.33 µs
Web Assembly: Latest 138.29 µs/iter (121.58 µs … 2.29 ms) 137.71 µs 180.67 µs 199.83 µs
Web Assembly: Current 1.05 ms/iter (794.04 µs … 1.93 ms) 1.21 ms 1.62 ms 1.8 ms
Node API: Current 2.34 ms/iter (1.98 ms … 2.94 ms) 2.42 ms 2.83 ms 2.89 ms

summary for movies.findMany() (all - 25000)
Web Assembly: Current
8.1x slower than Web Assembly: Baseline
7.59x slower than Web Assembly: Latest
2.23x faster than Node API: Current

0 comments on commit 66439fa

Please sign in to comment.