Skip to content
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

bench: benchmark several common WASI scenarios #5274

Merged
merged 3 commits into from
Nov 16, 2022

Commits on Nov 15, 2022

  1. bench: benchmark several common WASI scenarios

    In order to properly understand the impact of providing thread-safe
    implmentations of WASI contexts (bytecodealliance#5235), we need benchmarks that measure
    the current performance of WASI calls using Wiggle. This change adds
    several common WASI scenarios as WAT files (see `benches/wasi/*.wat`)
    and benchmarks them with `criterion`. Using `criterion`'s `iter_custom`,
    the WAT file runs the desired number of benchmark iterations internally
    and the total duration of the runs is divided to get the average time
    for each loop iteration.
    
    Why WAT? When compiling these benchmarks from Rust to `wasm32-wasi`, the
    output files are large, contain other WASI imports than the desired
    ones, and overall it is difficult to tell if we are measuring what we
    expect. By hand-writing the WAT, it is (slightly) more clear what each
    benchmark is doing.
    abrown committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    59b1d34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fd26d95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b667308 View commit details
    Browse the repository at this point in the history