Skip to content

Commit

Permalink
Make it fly
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Jan 23, 2024
1 parent 8ac2595 commit 10b2cb6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/wasm-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
Web Assembly: Current
1.46x slower than Node API: Current
1.28x slower than Web Assembly: Baseline
1.10x slower than Web Assembly: Latest
10.10x faster than Web Assembly: Latest
β€’ movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Expand Down Expand Up @@ -207,21 +207,20 @@ jobs:
mean=$(echo "scale=4; $total_sum / $total_count" | bc)
echo "Extracted $total_count values from the benchmark output"
echo "Total sum: $total_sum"
echo "Total count: $total_count"
echo "Mean: $mean"
# Calculate the percentage of improvement or worsening
if (( $(echo "$mean > 1.015" | bc -l) )); then
percent=$(echo "scale=4; ($mean - 1) * 100" | bc)
summary="πŸš€ WASM query-engine performance will improve by $(printf %.2f "$percent")%"
status=passed
elif (( $(echo "$mean < 0.985" | bc -l) )); then
# Report improvement or worsening. Fails if >= 1.5% worsening.
if (( $(echo "$mean < 0.985" | bc -l) )); then
percent=$(echo "scale=4; ((1 / $mean) - 1) * 100" | bc)
summary="❌ WASM query-engine performance will worsen by $(printf %.2f "$percent")%"
status=failed
elif (( $(echo "$mean > 1.015" | bc -l) )); then
percent=$(echo "scale=4; ($mean - 1) * 100" | bc)
summary="πŸš€ WASM query-engine performance will improve by $(printf %.2f "$percent")%"
status=passed
else
delta=$(echo "scale=4; (1 / $mean)" | bc)
summary="βœ… WASM query-engine performance won't change substantially. AVG(latency) = $(printf $.2f "$delta")x"
Expand Down

0 comments on commit 10b2cb6

Please sign in to comment.