alexcrichton opened PR #5541 from fix-bench-api
to main
:
This commit fixes an issue that I ran into just now where benchmarking one
*.so
with--engine-flags
was giving wildly unexpected results comparing to something without--engine-flags
. The root cause here appears to that when specifying--engine-flags
the CLI parsing code is used to create aConfig
and when omitted aConfig::new
instance is created. The main difference between these is that for the CLI caching is enabled by default and forConfig::new
it is not. Coupled with the fact that caching doesn't really work for themain
branch this ended up giving wild results.The fix here is to first always use the CLI parsing code to create a
Config
to ensure that a config is consistently created. Next the--disable-cache
flag is unconditionally passed to the CLI parsing to ensure that compilation actually happens.Once applied this enables comparing an engine without flags and an engine with flags which provides consistent results.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton requested fitzgen for a review on PR #5541.
fitzgen submitted PR review.
fitzgen created PR review comment:
Can we just do a null pointer and zero len for flags when not provided, always parse the
Config
from that resulting potentially-empty flags string, and then rely on https://github.com/bytecodealliance/wasmtime/pull/5542 for disabling the cache?
fitzgen submitted PR review.
alexcrichton updated PR #5541 from fix-bench-api
to main
.
alexcrichton closed without merge PR #5541.
Last updated: Dec 23 2024 at 12:05 UTC