Improve workload stepping in developerMode (#550)

- Use the temp currentSteppingResolver varialbe in places we modiify the
  _steppingResolver to avoid acessing the oudated version
- Add an explicti "Finished" step so we can inspect the final state of a workload 
   instead of jumping directly to the setup of the next one
This commit is contained in:
Camillo Bruni 2026-06-18 10:49:30 +02:00 committed by GitHub
parent 001a3926e6
commit f866d2b077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,8 +43,7 @@ class MainBenchmarkClient {
this._steppingPromise = new Promise((resolve) => {
this._steppingResolver = resolve;
});
if (this._isStepping())
currentSteppingResolver();
currentSteppingResolver?.();
if (!this._isRunning) {
this._startBenchmark();
this._showSection("#running");
@ -55,7 +54,7 @@ class MainBenchmarkClient {
const currentSteppingResolver = this._steppingResolver;
this._steppingPromise = null;
this._steppingResolver = null;
currentSteppingResolver();
currentSteppingResolver?.();
}
async _awaitNextStep(suite, test) {
@ -127,9 +126,11 @@ class MainBenchmarkClient {
await this._awaitNextStep(suite, test);
}
didFinishSuite() {
async didFinishSuite(suite) {
this._finishedTestCount++;
this._progressCompleted.value = this._finishedTestCount;
if (this._steppingPromise)
await this._awaitNextStep(suite, { name: "Finished" });
}
didRunSuites(measuredValues) {