bench: add more WASI benchmarks (#5309)

* bench: add more WASI benchmarks

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.

* fix: reduce expected size of directory entries
This commit is contained in:
Andrew Brown
2022-11-21 16:02:06 -08:00
committed by GitHub
parent d0d3245a35
commit 4899537328
5 changed files with 189 additions and 1 deletions

1
benches/wasi/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
test.bin