Skip to content

Fix AsyncBenchmarkStep never awaiting its step - #589

Open
canova wants to merge 1 commit into
WebKit:mainfrom
canova:async-step-await
Open

canova wants to merge 1 commit into
WebKit:mainfrom
canova:async-step-await

Conversation

@canova

@canova canova commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

StepRunner only awaited the step body when its "type" argument was "async". AsyncBenchmarkStep created an AsyncStepRunner without passing that argument, so the step promise was never awaited and an async remote step measured ~0ms with no error.

This commit makes the runner class decide instead: an isAsync getter is false on StepRunner and true on AsyncStepRunner, and the type argument is removed. Sync steps stay a plain call, since awaiting them would add a microtask hop to the measured time.

The bug was never hit because nothing in the tree or in the open workload PRs uses AsyncBenchmarkStep. But this is a requirement for the pdf.js workload that I'm working on.

`StepRunner` only awaited the step body when its "type" argument was
"async". `AsyncBenchmarkStep` created an `AsyncStepRunner` without passing
that argument, so the step promise was never awaited and an async remote
step measured ~0ms with no error.

This commit makes the runner class decide instead: an `isAsync` getter
is false on `StepRunner` and true on `AsyncStepRunner`, and the type
argument is removed. Sync steps stay a plain call, since awaiting them
would add a microtask hop to the measured time.

The bug was never hit because nothing in the tree or in the open
workload PRs uses `AsyncBenchmarkStep`. But this is a requirement for
the pdf.js workload that I'm working on.
@netlify

netlify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for webkit-speedometer-preview ready!

Name Link
🔨 Latest commit f9a4d7b
🔍 Latest deploy log https://app.netlify.com/projects/webkit-speedometer-preview/deploys/6ab27f033ad1ce00080f18e5
😎 Deploy Preview https://deploy-preview-589--webkit-speedometer-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant