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: add more WASI benchmarks #5309

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Nov 21, 2022

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