Very Good Performance

Very Good Ventures

Developed with 💙 by Very Good Ventures 🦄

ci pub package License: MIT style: very good analysis

Utility on top of the Flutter Driver API that facilitates measuring the performance of your app in an automated way



Add a new file at root of your project named very_good_performance.yaml with the following fields.

You can modify these values to match your own performance expectations.

  directory: performance/reports
  should_fail_build_on_warning: true
  should_fail_build_on_error: true
    warning: 5
    error: 10
    warning_time_in_milliseconds: 14.0
    error_time_in_milliseconds: 16.0
    warning_time_in_milliseconds: 14.0
    error_time_in_milliseconds: 16.0

Running tests with FlutterDrive

Simply wrap your FlutterDriver tests with the method capturePerformanceReport to start collecting performance information

test('tapping on the Increment button updates the counter', () async {
  await driver.capturePerformanceReport(
    reportName: 'counter_performance',
    action: () async {
      await driver.tap(find.byType(FloatingActionButton));
      expect(await driver.getText(find.text('1')), '1');
      await driver.tap(find.byType(FloatingActionButton));
      expect(await driver.getText(find.text('2')), '2');

At the end of the execution, you will see a similar report to this one:

Performance Report

Running the example project

You can find an example project that showcases how to use this library.

$> cd example
$> flutter drive --target=e2e/e2e.dart --driver=e2e/counter_test.dart -d macos --profile

You should see the Counter app running and, at the end of the execution, it will print the performance overview in the console, and will generate the performance reports under e2e/performance/reports.