Skip to content

[Web Benchmarks] Headless single-command runner for local web benchmarks #191316

Closed

Description

@harryterkelsen

Part of #191313

Problem

Running web benchmarks locally is cumbersome. Engine micro-benchmarks require manual profiling builds, while macrobenchmarks (`dev/benchmarks/macrobenchmarks`) require either running the heavy devicelab harness or manually clicking in a browser.

Solution

  1. Provide a single-command CLI to execute web benchmarks headlessly in Chrome.
  2. Output structured JSON metrics (frame render times, draw times, memory, profiler counters) and a terminal summary table.
  3. Support comparing results against a baseline JSON or `main` branch to catch performance regressions locally.

Critical Edge Cases & Implementation Gotchas

Related Issues & Historical Context

Activity

  1. added
    engineflutter/engine related. See also e: labels.
    platform-webWeb applications specifically
    team-webOwned by Web platform team
    on Aug 18, 2026
  2. added
    P1High-priority issues at the top of the work list
    triaged-webTriaged by Web platform team
    on Aug 19, 2026
  3. harryterkelsen commented on Oct 28, 2026

    @harryterkelsen
    ContributorAuthor

    Completed and landed across the following PRs on master:

    1. Targeting and fail-fast filtering: Web Benchmarks Part 2: Benchmark Targeting & Fail-Fast Filtering #194400 added --benchmark, --filter, --[no-]clean, and fast-failure for unrecognized benchmark names.
    2. Baseline comparison, regression evaluation, and ANSI summary tables: Add web benchmark baseline comparison, ANSI summary table, and structured JSON helpers #194609 added compareResults, zero-baseline handling, formatAnsiSummaryTable, and smoke-test definitions.
    3. Standalone local CLI runner and runtime local engine flags: Web Benchmarks Part 4: Standalone Local CLI Runner #194782 added dev/devicelab/bin/run_local_web_benchmark.dart supporting --renderer, --benchmark, --smoke-test, --filter, --baseline, --results-file, --regression-threshold, --no-build, and runtime --local-web-sdk / --local-engine-src-path overrides, with a structured 4-state exit code taxonomy. (This also resolves [web] Add support for --local-web-sdk in benchmarks #123781.)
    4. Raw sample recording and phase hooks: [web] Add opt-in raw samples, measured sample count and warm-up phase hook to the web benchmark recorder #195118 added opt-in raw sample reporting, configurable sample counts, and warm-up phase transition hooks to the macrobenchmarks recorder.

    Developers and agents can now run benchmarks locally and headlessly with:
    dart dev/devicelab/bin/run_local_web_benchmark.dart --smoke-test --baseline /path/to/baseline.json --regression-threshold 5.0

    Closing as completed.

  4. github-actions commented on Nov 11, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions