-
Notifications
You must be signed in to change notification settings - Fork 19
Add initial README with some setup and runner instructions #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+105
−25
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d7c64e3
add initial README with some setup and runner instructions
danleh fbd86b3
fix links
danleh 4d5659c
add descriptions for preloading and compression, more details on scoring
danleh ff781d0
s/Web Assembly/WebAssembly in in-depth, update some outdated information
danleh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # What is JetStream? | ||
|
|
||
| JetStream 3 is a JavaScript and WebAssembly benchmark suite. | ||
| For more information see the index and in-depth pages of the deployed benchmark. | ||
|
|
||
| A preview of the current main branch is available at [https://webkit-jetstream-preview.netlify.app/](https://webkit-jetstream-preview.netlify.app/). | ||
|
|
||
| <img src="./resources/screenshot.png"> | ||
|
|
||
| ## Open Governance | ||
|
|
||
| See [Governance.md](Governance.md) for more information. | ||
|
|
||
| ## Getting Started, Setup Instructions | ||
|
|
||
| - Install Node.js and (optionally) [jsvu](https://github.com/GoogleChromeLabs/jsvu) for conveniently getting recent builds of engine shells. | ||
| - `npm install` the necessary dependencies. | ||
| - `npm run server` for starting a local development server, then browse to http://localhost:8010. | ||
| - `npm run test:shell` for running the benchmark in engine shells, or alternatively running directly, e.g., via `jsc cli.js`. | ||
|
|
||
| See [package.json](package.json) and [.github/workflows/test.yml](.github/workflows/test.yml) for more details and available commands. | ||
|
|
||
| ### Shell Runner | ||
|
|
||
| For the shell runner, see the available options by passing `--help` to `cli.js`. (Note that this requires `--` for JavaScriptCore and V8 to separate VM arguments from script arguments.): | ||
|
|
||
| ``` | ||
| $ v8 cli.js -- --help | ||
| JetStream Driver Help | ||
|
|
||
| Options: | ||
| --help Print this help message. | ||
| --iteration-count Set the default iteration count. | ||
| ... | ||
|
|
||
| Available tags: | ||
| all | ||
| ... | ||
|
|
||
| Available tests: | ||
| 8bitbench-wasm | ||
| ... | ||
| ``` | ||
|
|
||
| ### Browser Runner | ||
|
|
||
| The browser version also supports passing parameters as URL query parameters, e.g., pass the `test` parameter (aliases are `tests` or `testList`) with a comma-separated list to run only specific workloads: [https://webkit-jetstream-preview.netlify.app/?test=8bitbench-wasm,web-ssr](https://webkit-jetstream-preview.netlify.app/?test=8bitbench-wasm,web-ssr). | ||
| See [utils/params.js](utils/params.js) and [JetStreamDriver.js](JetStreamDriver.js) for more details. | ||
|
|
||
| ## Technical Details | ||
|
|
||
| The main file of the benchmark harness is `JetStreamDriver.js`, which lists the individual workloads and their parameters, implements measurement and scoring, etc. | ||
| The individual workloads are in subdirectories. | ||
|
|
||
| ### Preloading and Compression | ||
|
|
||
| The JetStream driver (both in the browser and shell runners) _preloads_ some large assets and source files. | ||
| That is, it reads those files from disk or fetches them from the network before running the workloads. | ||
| This is in order to exclude network latency and disk I/O from the benchmark measurements and reduce variance. Otherwise, OS scheduling or CPU frequency scaling may affect the measurement. | ||
|
|
||
| Some workloads also utilize large assets (e.g., ML models, heavy JavaScript bundles in the order of 10s of MBs). | ||
| In order to limit the repository size and network transfers, such large assets are stored as compressed .z files. | ||
| Preloading handles the decompression of these assets (using `DecompressionStream` or a Wasm-based zlib polyfill) upfront so that decompression overhead does not affect the benchmark score. | ||
|
|
||
| Both preloading and compression can be disabled, e.g., to inspect raw files or because it sometimes helps with debugging (e.g., proper URLs instead of Blobs for resources). | ||
|
|
||
| - Compression: Run `npm run decompress` to decompress all .z files before running the benchmark. | ||
| - No prefetching for shells: Pass the `--no-prefetch` flag, e.g., `jsc cli.js -- --no-prefetch`. | ||
| - No prefetching in browsers: Append the query parameter `?prefetchResources=false` to the URL. | ||
|
|
||
| See `JetStreamDriver.js` and `utils/compress.mjs` for more details. | ||
|
|
||
| ### Score Calculation | ||
danleh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Scores in JetStream are dimensionless floats, where a higher score is better. | ||
| When scores are aggregated (e.g., multiple sub-scores for each workload, or to determine the total score of the full benchmark suite), we use the [geometric mean](https://en.wikipedia.org/wiki/Geometric_mean). | ||
| The geometric mean ensures that a multiplicative improvement of any individual score has the same effect on the aggregated score, regardless of the absolute value of the individual score. | ||
| For example, an improvement by 5% of the sub score of benchmark A has the same effect on the total score as an improvement by 5% of the sub score of benchmark B. | ||
|
|
||
| See the [in-depth.html](https://webkit-jetstream-preview.netlify.app/in-depth.html) and `JetStreamDriver.js` for more details. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit unclear what preloading means in this context. Might be worth splitting this into two parts e.g.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points, I'll use that tomorrow in a follow-up (or feel free to send a quick PR, whatever works).