Skip to content

bench: add more WASI benchmarks - #5309

Merged
abrown merged 2 commits into
bytecodealliance:mainfrom
abrown:bench-wasi
Nov 22, 2022
Merged

abrown merged 2 commits into
bytecodealliance:mainfrom
abrown:bench-wasi

Conversation

@abrown

@abrown abrown commented Nov 21, 2022

Copy link
Copy Markdown
Member

This follows up on #5274 to add several more scenarios with which to benchmark WASI performance:

  • open-file.wat: opens and closes a file
  • read-file.wat: opens a file, reads 4K bytes from it, then closes it
  • read-dir.wat: reads a directory's entries

Each benchmark is hand-crafted WAT to more clearly control what WASI calls are made. As with #5274, these modules' sole entry point takes a parameter indicating the number of iterations to run in order to use criterion's iter_custom feature.

This follows up on bytecodealliance#5274 to add several more scenarios with which to
benchmark WASI performance:
- `open-file.wat`: opens and closes a file
- `read-file.wat`: opens a file, reads 4K bytes from it, then closes it
- `read-dir.wat`: reads a directory's entries

Each benchmark is hand-crafted WAT to more clearly control what WASI
calls are made. As with bytecodealliance#5274, these modules' sole entry point takes a
parameter indicating the number of iterations to run in order to use
`criterion`'s `iter_custom` feature.
@abrown
abrown marked this pull request as ready for review November 21, 2022 22:07
@abrown
abrown enabled auto-merge (squash) November 21, 2022 22:07
@abrown
abrown merged commit 4899537 into bytecodealliance:main Nov 22, 2022
@abrown abrown added the wasi Issues pertaining to WASI label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants