-
Notifications
You must be signed in to change notification settings - Fork 33
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
Organize benchmarks into suites #202
Comments
cc: @fitzgen, @jlb6740, @cfallin, @alexcrichton, @jameysharp, @bnjbvr |
I really like this idea overall! I'd be tempted to say that Especially for supporting the use case of out-of-tree suites, I think it's important to specify that paths in a Unrelated to this, it's been bothering me that Sightglass doesn't produce any output until the end. So I wrap a shell loop around it and run one benchmark per |
Thanks for the feedback!
Do you mean all positional arguments to the benchmark command are put in the same list and we detect if they are a
Yup, good point.
Yeah, that's a separate problem that I probably introduced when I added the measurement serialization code. IIRC, I had to wait until all measurements were collected to serialize them with |
Yeah, something along those lines. If you specify a few suites and some individual benchmarks, it'd run all of them... but de-duplicate, perhaps? Like I said, the
Ah, I wondered why it was that way, but that makes sense!
Absolutely unrelated to suites, this just reminded me of it. Thanks for opening that issue. |
This change closes bytecodealliance#202 by adding a way to group benchmarks into `*.suite` files. This incorporates @jameysharp's comments, e.g., to calculate the benchmark path relative to the suite path and to detect suite files based on their `.suite` extension. Though more suites could be added in the future, the result of this is that suite files can be built (see `benchmarks/shootout.suite`, e.g.) and then run like: ```console $ sightglass-cli benchmark benchmarks/shootout.suite -e ... ```
This change closes bytecodealliance#202 by adding a way to group benchmarks into `*.suite` files. This incorporates @jameysharp's comments, e.g., to calculate the benchmark path relative to the suite path and to detect suite files based on their `.suite` extension. Though more suites could be added in the future, the result of this is that suite files can be built (see `benchmarks/shootout.suite`, e.g.) and then run like: ```console $ sightglass-cli benchmark benchmarks/shootout.suite -e ... ```
Alternative to |
That's limited in that benchmarks are contained in a single directory. (I guess we could create a bunch of symlinks but that doesn't work everywhere). One thing I like about the suite idea is the ability to create cross-cutting suites like |
* Organize benchmarks into suites This change closes #202 by adding a way to group benchmarks into `*.suite` files. This incorporates @jameysharp's comments, e.g., to calculate the benchmark path relative to the suite path and to detect suite files based on their `.suite` extension. Though more suites could be added in the future, the result of this is that suite files can be built (see `benchmarks/shootout.suite`, e.g.) and then run like: ```console $ sightglass-cli benchmark benchmarks/shootout.suite -e ... ``` * review: avoid ignoring buffered read errors * review: return `Vec<PathBuf>` from `BenchmarkOrSuite::paths` * review: ensure `execute_in_multiple_processes` assigns a single benchmark to each subprocess * review: document Windows canonicalization concerns * review: suites are files
I am proposing in this issue that we add a way for
sightglass-cli
to benchmark a specific set of files together.Why
spidermonkey
,bz2
,pulldown-cmark
); in the past I have wanted to only run theshootout-*
micro-benchmarks or "all the benchmarks that use SIMD."sightglass-cli benchmark ... benchmarks/*/benchmark.wasm
(as the README currently advises the user). These special benchmarks (e.g., due to environment setup, compile-time or runtime flags, etc.) could be separated in to their own suite.benchmark
subcommand, default to all benchmark programs #71 requests a default set of benchmarks to run automatically if no benchmark files are specified — one could imagine a default suite for that.How
The core idea would be to create a set of
*.suite
files.*.suite
files would contain a newline-delimited list of benchmark paths relative to the Sightglass project directory and would accept#
line comments. E.g.,foo.suite
could look like:sightglass-cli
would accept a new flag —--suite
— with the path to the*.suite
file to use. It would be an error to specify both a suite and a benchmark file; other than that, running benchmarks by path (the current way) would remain unchanged. Users could create their own*.suite
files and manage these outside the repository but the Sightglass repository would contain a few*.suite
files. There are many ways to slice this, but I could see the following initial set:default.suite
shootout.suite
simd.suite
If no benchmark paths or suites are specified,
sightglass-cli
would run the benchmarks contained in thedefault.suite
.I would appreciate feedback on this proposal before implementing it. Any thoughts one way or another are appreciated!
The text was updated successfully, but these errors were encountered: