Open
Description
There are some workloads that we hard to capture synchronously in a BenchmarkTestStep. Areas this has come up
- Moanco (Two new editor workloads #81 (comment)) since it relies on a worker to do some processing
- React-Stockcharts (Add react-stockcharts benchmarks #11 (comment)), and @camillobruni has raised some concerns with bimodal distribution on Chrome that is quite possibly related.
- In the research on data grids I see some grid libraries that delay rendering and so spend 0ms during the step. I've also experimented with and think we should consider using in-memory SQLite WASM as a backend for these tests, and that runs in a worker so async is a must-have.
- In the research on charting libraries that @julienw has been doing - where certain libraries delay rendering (especially React-based wrappers AIUI) in a way that causes significant work to happen outside of the timed window.
@rniwa and I discussed a bit on WebKit Slack, and concluded
yeah, making the sync step compatible with promise seems okay to me. We just need to make sure we don't accidentally start measuring truly async stuff like network loads and such.
I don't know mechanically what will be involved with a change here, and the main runner function comments about not using Promise
Speedometer/resources/benchmark-runner.mjs
Line 230 in 24b094d