mirror-jetstream/jsdom-d3-startup
Camillo Bruni 0368cebd22 Reset main-custom branch to upstream/main
All important runner changes have landed upstream.

Bug: 358290763
Change-Id: Ib47f6838618e9c0081f60f3b60d52b1ce149b2af
Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/WebKit/JetStream/+/7094856
Reviewed-by: Marja Hölttä <marja@chromium.org>
2025-10-29 02:20:40 -07:00
..
build Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
data Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
dist Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
src Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
benchmark-node.mjs Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
benchmark.js Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
package-lock.json Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
package.json Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
README.md Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00
webpack.config.mjs Reset main-custom branch to upstream/main 2025-10-29 02:20:40 -07:00

JSDOM D3 Startup Benchmark

The benchmark reads airport and US geography data, then uses D3 to create a Voronoi diagram of the airports overlaid on a map of the US. It uses jsdom to simulate a browser environment for D3 to render to an SVG element.

JetStream integration

  • We use a custom ./build/build/cache-buster-comment-plugin.cjs which injects a known comment into every function in the bundle
  • The JetStream benchmark replaces these comments with a unique string per iteration
  • Each benchmark iteration includes parse and top-level eval time

Setup

# Install node deps from package-lock.json
npm ci --include=dev; 
# Bundle sources to dist/*.
npm run build
# Use build:dev for non-minified sources.
npm run build:dev

Testing

# Run the basic node benchmark implementation for development. 
npm run test