Skip to content

ci(bench): continuous wasm dashboard shard (structured-zstd wasm vs @bokuweb/zstd-wasm) #366

Description

@polaz

Problem

The wasm-vs-competitor comparison (zstd-wasm/bench/bench.mjs, added in #348/PR #364) runs only locally as a pre-publish gate. The gh-pages perf dashboard tracks the Rust↔C-FFI matrix but not the wasm payloads, so there is no continuous tracking of wasm simd128/scalar speed + ratio vs the most popular npm competitor (@bokuweb/zstd-wasm). A wasm perf/ratio regression would only surface if someone re-runs the bench by hand.

Goal

A push-to-main bench shard that runs node zstd-wasm/bench/bench.mjs, emits the existing REPORT / REPORT_DICT lines, and feeds the dashboard aggregation — so wasm perf vs bokuweb is tracked over time like the native matrix. (PR-time stays clean: the whole bench pipeline is already push-only.)

Plan

  1. CI shard (.github/workflows/ci.yml, bench pipeline, push-only): add a wasm "target"/shard whose run step builds the npm payloads (cd zstd-wasm/npm && npm ci && npm run build) then runs node ../bench/bench.mjs, capturing its stdout REPORT* lines as an artifact — instead of executing the prebuilt Rust bench binary the other shards use.
  2. Aggregation: extend .github/scripts/aggregate-bench-levels.py + merge-benchmarks.py to ingest the wasm REPORT scenario=... engine={ours-simd128|ours-scalar|bokuweb} ... and REPORT_DICT ... lines into a dedicated wasm section.
  3. Dashboard: render the wasm comparison (simd128/scalar vs bokuweb: ratio + compress/decompress speed) in .github/bench-dashboard/index.html.

Acceptance criteria

  • Push-to-main runs the wasm bench shard; REPORT* lines captured + aggregated.
  • dev/bench dashboard shows wasm simd128/scalar vs bokuweb ratio + speed over time.
  • No PR-time cost (shard is push-only, consistent with the rest of the bench pipeline).

Estimate

1d (CI shard wiring + REPORT-parser extension for the wasm engine triplet + a dashboard section).

Follow-up from #348 (PR #364). The pre-publish measurement need is already covered locally by node zstd-wasm/bench/bench.mjs; this issue is purely about continuous tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumMedium priority — important improvementenhancementNew feature or requestperformancePerformance optimization

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions