5 releases (3 breaking)
0.5.1 | Dec 5, 2022 |
---|---|
0.5.0 | Dec 2, 2022 |
0.4.1 | Nov 30, 2022 |
0.2.0 | Nov 30, 2022 |
0.1.0 | Jun 8, 2022 |
#220 in Profiling
76KB
1.5K
SLoC
Synthetic Module Benchmark with Web Bundles
Basic Usage
- Install
Rust
andDeno
(optional) beforehand. - See
Make.zsh
for example usages. The following is summary:
-
Checkout:
git clone https://github.com/google/webbundle.git`
-
Generate the modules and the benchmarks.
Example:
cd webbundle/webbundle-bench cargo run --release -- --out out --depth 4 --branches 4
See
build()
inMake.zsh
. -
Start webserver.
Example:
cd ../webbundle-server cargo build --release cd ../webbundle-bench RUST_LOG=error ../target/release/webbundle-server --port 8080
See
run_webserver()
inMake.zsh
. -
Open
http://localhost:8080/out/index.html
in your browser, and click each benchmark. -
(Optional) Run the benchmark using puppeteer for automation:
deno run --allow-all ./run-bench.ts --port 8080
See
bench()
inMake.zsh
.
What's not implemented
webbundle-bench
is inspired by
js-modules-benchmark
.
webbundle-bench
is rewritten with Rust and Deno so we don't depend on Python and Node.js, and supports very minimum features which are necessary to benchmark Web Bundle loading performance.
webbundle-bench
is missing many features at this point:
- Support
modulepreload
. - Rules to generate modules.
- Specify the size of generated modules.
- Support other bundlers (e.g.
rollup
)
Dependencies
~8–17MB
~222K SLoC