Skip to content
pubscout

web_benchmarks

4.1.3, released 10 days ago by flutter.dev

A benchmark harness for performance-testing Flutter web apps in Chrome.

$ flutter pub add web_benchmarks
Source repository

What it does

Provides a client and server harness to performance-test Flutter web applications inside Chrome. It automates running benchmarks, extracting performance traces, and analyzing or comparing results.

AI-written summary of version 4.1.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to performance-test Flutter web applications in Chrome
  • You want to compute deltas or averages between multiple benchmark runs

Skip it when

  • You are testing mobile or desktop apps rather than Flutter web
  • You want to run benchmarks in browsers other than Chrome

Strengths

  • Automates extracting performance traces and metrics from Chrome
  • Supports analyzing and comparing benchmark results with built-in delta and average computations

Weaknesses

  • Currently only supports running benchmarks in Chrome
  • Requires setting up both a client and a server harness

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
9

Requires setting up a client benchmark code piece and a server to serve the app's code, assets, and communicate with the browser.

import 'dart:convert';
import 'dart:io';
import 'package:web_benchmarks/analysis.dart';

void main() {
  final BenchmarkResults baselineResults = BenchmarkResults.parse({});
  final BenchmarkResults testResults1 = BenchmarkResults.parse({});
  final BenchmarkResults delta = computeDelta(baselineResults, testResults1);
  stdout.writeln(delta.toJson());
}

Alternatives

Packages that do the same job and could replace web_benchmarks.

Works with

Packages commonly used together with web_benchmarks: ones it builds on, ones built on it, and its own family.