Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script for benchmarking
wasmtime serve
's requests per second (b…
…ytecodealliance#7955) There are a *ton* of different options such a script could have, and things we could tweak. This is just meant to be a shared starting point so it is easy to get up and running with something. Example output: ``` ./benches/wasmtime-serve-rps.sh -O pooling-allocator hello_wasi_http.wasm Finished `release` profile [optimized] target(s) in 0.17s Running `target/release/wasmtime serve -O pooling-allocator hello_wasi_http.wasm` Serving HTTP on http://0.0.0.0:8080/ Running `wasmtime serve` in background as pid 2476839 Benchmarking for 10 seconds... Summary: Total: 10.0025 secs Slowest: 0.0138 secs Fastest: 0.0001 secs Average: 0.0013 secs Requests/sec: 39461.5419 Response time histogram: 0.000 [1] | 0.001 [277602] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 0.003 [111637] |■■■■■■■■■■■■■■■■ 0.004 [4182] |■ 0.006 [720] | 0.007 [301] | 0.008 [143] | 0.010 [76] | 0.011 [26] | 0.012 [19] | 0.014 [7] | Latency distribution: 10% in 0.0006 secs 25% in 0.0009 secs 50% in 0.0012 secs 75% in 0.0016 secs 90% in 0.0019 secs 95% in 0.0022 secs 99% in 0.0031 secs Details (average, fastest, slowest): DNS+dialup: 0.0000 secs, 0.0001 secs, 0.0138 secs DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs req write: 0.0000 secs, 0.0000 secs, 0.0092 secs resp wait: 0.0012 secs, 0.0001 secs, 0.0137 secs resp read: 0.0000 secs, 0.0000 secs, 0.0113 secs Status code distribution: [200] 394714 responses ```
- Loading branch information