Skip to content

How to add a simple Flutter device lab drive perf test

liyuqian edited this page Jun 27, 2019 · 1 revision

Do the following to add a blah perf test to the Flutter device lab:

  1. Modify dev/devicelab/manifest.yaml to add a new entry blah

    • Always mark the new test to be flaky
  2. Create your test file dev/devicelab/bin/tasks/blah.dart

  3. In dev/devicelab/lib/tasks/perf_tests.dart, add a new function createBlahPerfTest

To test the device lab test blah locally, run

cd dev/devicelab
dart bin/run.dart -t blah

Alternatively, you can also run the drive test locally. For example:

cd dev/benchmarks/macrobenchmarks && flutter drive --profile test_driver/cull_opacity_perf.dart

or

cd dev/benchmarks/complex_layout && flutter drive --profile test_driver/scroll_perf.dart
Clone this wiki locally