Skip to content

Reorganize workloads into a top-level workloads/ directory - #318

Open
harini9803 wants to merge 3 commits into
WebKit:mainfrom
harini9803:workload-directory-reorganization
Open

harini9803 wants to merge 3 commits into
WebKit:mainfrom
harini9803:workload-directory-reorganization

Conversation

@harini9803

Copy link
Copy Markdown

Fixes #276.

Pure cleanup/reorg — no workload was changed materially.

  • All workloads now live under workloads/.
  • Each workload has its own subdirectory named exactly after its registered
    name, except closely-related workloads that share files (ARES-6, Octane,
    RexBench, SeaMonster, SunSpider, bigint, proxy, code-load, babylonjs,
    prismjs, transformersjs, Dart, dotnet, tfjs-wasm, intl,
    web-tooling-benchmark).
  • The wasm/ grouping is gone; Wasm workloads sit next to the JS ones.
  • simple/, generators/, class-fields/ and worker/ were split, since
    their workloads shared no files.

912 of the 926 changed files are pure renames. Content edits are limited to
five root files (JetStreamDriver.js, in-depth.html, .prettierignore,
.gitignore, tests/run-license.mjs) and nine workload files: four
webpack.config.mjs (../utils -> ../../utils), three sources with
hardcoded root-relative paths (below), plus a stale comment in
argon2-wasm/benchmark.js and a stale link in dotnet/README.md.

Testing

  • test:chrome -- default — 77 benchmarks, 0 failures
  • test:chrome -- disabled — 17 benchmarks, 0 failures
  • test:in-depth — 4/4, incl. the relative-link check
  • test:license — passes; verified no files silently dropped from checking
  • prettier — unchanged (same pre-existing warnings as main)
  • V8 shell (jsvu v15.6.21): unit tests, CLI, proxy-mobx, grouped SunSpider,
    and argon2-wasm — the last one exercises the compressed-resource path that
    loads zlib-wasm/shell.js.

Firefox/Safari, and the jsc/spidermonkey shells, are left to CI.

Notes for review

  • Besides the mechanical path updates, three workload sources had root-relative
    paths hardcoded inside them — invisible to the driver's files/preload
    lists: transformersjs/benchmark.js (localModelPath and the ONNX mjs
    prefix), tfjs-wasm/tfjs.js (WASM_TFJS_DIR), and zlib-wasm/shell.js
    (shell-only zlib polyfill).
  • test:build triggers on changed directories, and every workload directory
    moved, so CI will rebuild all 8 buildable workloads — expect a long run.
  • wasm/tsf.js / wasm/tsf.wasm are unreferenced leftovers from the initial
    WebKit import, superseded by tsf-wasm/build/. I moved rather than deleted
    them — happy to drop them in a follow-up if you'd prefer.
  • RexBench/sunspider_benchmark.js references SunSpider/...; it's a legacy
    standalone harness not registered in BENCHMARKS, and that path was already
    broken before this change, so I left it alone.

Pure cleanup/reorg; no workload changed materially.

- Move every workload under workloads/.
- Each workload gets its own subdirectory named exactly after its
  registered name, except closely-related workloads that share files
  (ARES-6, Octane, RexBench, SeaMonster, SunSpider, bigint, proxy,
  code-load, babylonjs, prismjs, transformersjs, Dart, dotnet,
  tfjs-wasm, intl, web-tooling-benchmark).
- Drop the wasm/ grouping; Wasm workloads now sit next to the JS ones.

Renamed to match workload names: wasm/HashSet -> HashSet-wasm,
wasm/TSF -> tsf-wasm, wasm/quicksort -> quicksort-wasm,
wasm/gcc-loops -> gcc-loops-wasm, wasm/richards -> richards-wasm,
wasm/argon2 -> argon2-wasm, wasm/zlib -> zlib-wasm,
wasm/j2cl-box2d -> j2cl-box2d-wasm, wasm/dotnet -> dotnet,
sqlite3 -> sqlite3-wasm, 8bitbench -> 8bitbench-wasm,
Kotlin-compose -> Kotlin-compose-wasm, mobx -> mobx-startup,
TypeScript -> typescript-lib, ARES-6/ml -> ARES-6/ML.

Split directories whose workloads shared no files: simple/,
generators/, class-fields/, worker/.

Updated path references in JetStreamDriver.js, in-depth.html,
.prettierignore, .gitignore, tests/run-license.mjs, four
webpack.config.mjs files (../utils -> ../../utils), and the
root-relative paths hardcoded inside workload sources:
transformersjs/benchmark.js (localModelPath, onnx mjs prefix),
tfjs-wasm/tfjs.js (WASM_TFJS_DIR), zlib-wasm/shell.js.
@netlify

netlify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit 5f76c1a
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/6abde521252aae0008e48045
😎 Deploy Preview https://deploy-preview-318--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@harini9803

harini9803 commented Sep 22, 2026 •

Copy link
Copy Markdown
Author

@danleh Pushed a fix for the Test Build failure -Verified the build locally. Needs your approval again to run the workflows.

@danleh
danleh self-requested a review September 30, 2026 15:37
@danleh

danleh commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

(Sorry for the late reply.) Review is WIP but a first status update: Of the 926 changed files, only 15 are non-trivial (i.e., not just file renames, but also some content changes, see git diff -M --name-status | grep -v '^R100'):

  • Harness / config files (5 files):
    • .gitignore: updates the 3 decompressed file paths (RexBench/..., SeaMonster/..., wasm/argon2/... -> workloads/...).
    • .prettierignore: prefixes workload paths with /workloads/ and expands the split directories (simple/*, generators/*, class-fields/*, worker/*).
    • JetStreamDriver.js: updates all workload files, preload paths, and zlib-wasm/shell.js to ./workloads/....
    • in-depth.html: updates relative source code links to workloads/....
    • tests/run-license.mjs: updates IGNORE_PATTERNS for renamed/split workload directories.
  • Runtime path constants in workloads (3 files):
    • wasm/tfjs.js -> workloads/tfjs-wasm/tfjs.js: updates WASM_TFJS_DIR to './workloads/tfjs-wasm/'.
    • transformersjs/benchmark.js -> workloads/transformersjs/benchmark.js: updates env.localModelPath and .replace('./workloads/transformersjs/build/', './').
    • wasm/zlib/shell.js -> workloads/zlib-wasm/shell.js: updates load() and read() paths to workloads/zlib-wasm/build/zlib.{js,wasm}.
  • Webpack configs (5 files: all update ../utils/BabelCacheBuster.mjs -> ../../utils/BabelCacheBuster.mjs):
    • babylonjs/webpack.config.mjs -> workloads/babylonjs/webpack.config.mjs
    • jsdom-d3-startup/webpack.config.mjs -> workloads/jsdom-d3-startup/webpack.config.mjs
    • mobx/webpack.config.mjs -> workloads/mobx-startup/webpack.config.mjs
    • prismjs/webpack.config.mjs -> workloads/prismjs/webpack.config.mjs
    • web-ssr/webpack.config.mjs -> workloads/web-ssr/webpack.config.mjs
  • Comments / docs only (2 files):
    • wasm/argon2/benchmark.js -> workloads/argon2-wasm/benchmark.js
    • wasm/dotnet/README.md -> workloads/dotnet/README.md

Missed things during the reorganiziation/renaming:

AI tells me that a few .patch files applied via git apply in build.sh still have old repo-root-relative paths in their --- a/... / +++ b/... headers (which git apply resolves relative to the repository root even when invoked from a subdirectory):

  • workloads/Kotlin-compose-wasm/hook-print.patch (Kotlin-compose/build/... -> workloads/Kotlin-compose-wasm/build/...)
  • workloads/Kotlin-compose-wasm/jstag-workaround.patch (Kotlin-compose/build/... -> workloads/Kotlin-compose-wasm/build/...)
  • workloads/Kotlin-compose-wasm/skiko-disable-instantiate.patch (Kotlin-compose/build/... -> workloads/Kotlin-compose-wasm/build/...)
  • workloads/transformersjs/transformers.js.patch (transformersjs/build/... -> workloads/transformersjs/build/...)

Can you fix those?

@danleh danleh left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at all modified files and LGTM modulo the small missed things in the patch files (see comment above). As a double-check I am also locally comparing scores before and after (still running...) but no reason to expect any changes... @eqrion @kmiller68 Feel free to review as well or locally benchmark, I'm happy to merge this after you give the OK.

@danleh

danleh commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Compared scores before and after, looking good as well (as expected, d8, N=3 interleaved runs):

  • Both main (c603c04) and this PR (c6c0a18) execute the exact same 75 default workloads in the same order with zero errors, and all individual workload scores are within normal run-to-run noise.
  • Overall Score:
  • Wall-clock duration: 133.2s mean before vs 134.2s mean after.

@harini9803

Copy link
Copy Markdown
Author

Fixed in 5f76c1a - all four patch files now use workloads/-prefixed paths in their diff headers. Worth flagging that these were failing silently: git apply run from a subdirectory ignores patches whose paths fall outside that directory and still exits 0, so the builds would have skipped the patches with no error. Verified with git apply --reverse --check --verbose - the old headers processed 0 patches, the new ones process 1 each and reverse-apply cleanly against the committed build outputs. Left empty-main-function.patch and use-beta-toolchain.patch alone since those apply inside the cloned compose-multiplatform repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup workload directory structure

2 participants