Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bc1e94a
update
camillobruni Aug 19, 2025
07884c2
updaet
camillobruni Aug 19, 2025
2194a94
update deps
camillobruni Aug 19, 2025
12512fe
rename
camillobruni Aug 19, 2025
e5ba363
rename
camillobruni Aug 19, 2025
29f5f2d
more updates
camillobruni Aug 19, 2025
6511284
refactor data handling
camillobruni Aug 19, 2025
91965d0
update workloads
camillobruni Aug 19, 2025
47b3719
preparing node-cli runner
camillobruni Aug 19, 2025
aefba5b
updating tests
camillobruni Aug 19, 2025
67e7c74
fixing all benchamrks
camillobruni Aug 19, 2025
2d9781d
adding more workloads
camillobruni Aug 19, 2025
c22826f
more cleanup
camillobruni Aug 19, 2025
09adafe
fix
camillobruni Aug 19, 2025
63b4c19
fix build process
camillobruni Aug 19, 2025
4e7fc38
updating webpack config
camillobruni Aug 19, 2025
007597c
fix webpack
camillobruni Aug 19, 2025
ffbbccb
update
camillobruni Aug 19, 2025
7be8ccc
no dev deps, we only need one
camillobruni Aug 19, 2025
ac44f1e
fix
camillobruni Aug 19, 2025
9b02769
remove eslint
camillobruni Aug 19, 2025
4b652b8
adding benchamrk
camillobruni Aug 19, 2025
3e0735e
updarte
camillobruni Aug 19, 2025
3257d61
adding bundles
camillobruni Aug 19, 2025
6cb1c5d
fix array buffer loading
camillobruni Aug 19, 2025
32c7435
mocky
camillobruni Aug 19, 2025
c476fa8
fixing web encoding
camillobruni Aug 19, 2025
e66cd9c
fixing prettier
camillobruni Aug 19, 2025
e92e875
remove unused build dir
camillobruni Aug 19, 2025
1e45af6
update
camillobruni Aug 20, 2025
7e0064d
updating all libs
camillobruni Aug 20, 2025
c8fe61f
cleanup
camillobruni Aug 20, 2025
5cef7ef
updating builds
camillobruni Aug 20, 2025
3067360
speeding up babel workload
camillobruni Aug 20, 2025
1aca0f2
formatting
camillobruni Aug 20, 2025
795d39a
more formatting
camillobruni Aug 20, 2025
3cc3ceb
use esm for webpack config
camillobruni Aug 20, 2025
e8e5de7
update default files
camillobruni Aug 20, 2025
884a8a8
Merge branch 'main' of github.com:camillobruni/JetStream into 2025-08…
camillobruni Aug 26, 2025
dbeb316
add license and disable lebab
camillobruni Aug 26, 2025
7cede73
Merge branch 'main' into 2025-08-19_web-tooling-update
camillobruni Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 46 additions & 12 deletions JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ class Benchmark {
if (this.plan.preload) {
let preloadCode = "";
for (let [ variableName, blobURLOrPath ] of this.preloads)
preloadCode += `JetStream.preload.${variableName} = "${blobURLOrPath}";\n`;
preloadCode += `JetStream.preload[${JSON.stringify(variableName)}] = "${blobURLOrPath}";\n`;
scripts.add(preloadCode);
}

Expand Down Expand Up @@ -2527,7 +2527,7 @@ let BENCHMARKS = [
iterations: 15,
worstCaseCount: 2,
tags: ["Default", "Wasm", "dotnet"],
})
}),
];


Expand Down Expand Up @@ -2564,24 +2564,58 @@ BENCHMARKS.push(new GroupedBenchmark({
// WTB (Web Tooling Benchmark) tests
const WTB_TESTS = [
"acorn",
"babel",
"babel-minify",
"babylon",
"chai",
"coffeescript",
"espree",
"jshint",
"lebab",
"prepack",
"uglify-js",
"esprima-next",
// "lebab",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: We should probably comment as to why we're not running it anymore.

"postcss",
"prettier",
"source-map",
];
const WPT_FILES = [
"angular-material-20.1.6.css",
"backbone-1.6.1.js",
"bootstrap-5.3.7.css",
"foundation-6.9.0.css",
"jquery-3.7.1.js",
"lodash.core-4.17.21.js",
"lodash-4.17.4.min.js.map",
"mootools-core-1.6.0.js",
"preact-8.2.5.js",
"preact-10.27.1.min.module.js.map",
"redux-5.0.1.min.js",
"redux-5.0.1.esm.js",
"source-map.min-0.5.7.js.map",
"source-map/lib/mappings.wasm",
"speedometer-es2015-test-2.0.js",
"todomvc/react/app.jsx",
"todomvc/react/footer.jsx",
"todomvc/react/todoItem.jsx",
"todomvc/typescript-angular.ts",
"underscore-1.13.7.js",
"underscore-1.13.7.min.js.map",
"vue-3.5.18.runtime.esm-browser.js",
].reduce((acc, file) => {
acc[file] = `./web-tooling-benchmark/third_party/${file}`;
return acc
}, Object.create(null));


for (const name of WTB_TESTS) {
BENCHMARKS.push(new DefaultBenchmark({
BENCHMARKS.push(new AsyncBenchmark({
name: `${name}-wtb`,
files: [
(isInBrowser ? "./web-tooling-benchmark/browser.js" : "./web-tooling-benchmark/cli.js"),
`./web-tooling-benchmark/${name}.js`,
`./web-tooling-benchmark/dist/${name}.bundle.js`,
"./web-tooling-benchmark/benchmark.js",
],
iterations: 5,
worstCaseCount: 1,
preload: {
BUNDLE: `./web-tooling-benchmark/dist/${name}.bundle.js`,
...WPT_FILES,
},
iterations: 15,
Copy link
Contributor

Choose a reason for hiding this comment

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

4 Worst Case counts out of 15 seems kinda high relative to other benchmarks with 15 iterations. All the others do 2 worst cases for 15 iterations.

allowUtf16: true,
tags: ["Default", "WTB"],
}));
Expand Down
352 changes: 82 additions & 270 deletions web-tooling-benchmark/LICENSE

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions web-tooling-benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Web Tooling Benchmark

This is a clone/fork of the original [Web Tooling Benchmark](https://github.com/v8/web-tooling-benchmark).
Unlike the original, this is a JetStream-oriented version.

This benchmark provides workloads for common web tools.


## Build Instructions

```bash
# install required node packages.
npm ci
# build the workload, output is ./dist
npm run build
```
30 changes: 0 additions & 30 deletions web-tooling-benchmark/acorn.js

This file was deleted.

30 changes: 0 additions & 30 deletions web-tooling-benchmark/babylon.js

This file was deleted.

57 changes: 57 additions & 0 deletions web-tooling-benchmark/benchmark.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2025 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/



class Benchmark {
files = Object.create(null);

constructor(iterations) {
this.iterations = iterations;
}

async init() {
let WTBenchmark;
await this.loadAllFiles(JetStream.preload);
this.sourceCode = this.files.BUNDLE;
this.WTBenchmark = self.WTBenchmark;
}

async loadAllFiles(preload) {
const loadPromises = Object.entries(preload).map(
async ([name, url]) => {
if (name.endsWith(".wasm")) {
this.files[name] = (await JetStream.getBinary(url)).buffer;
} else {
this.files[name] = await JetStream.getString(url);
}
})
await Promise.all(loadPromises);
}

async runIteration() {
await this.WTBenchmark.runTest(this.files);
}
}
Loading
Loading