blob: 42e45c1427a1bf47683ef1bf8cc71beead7cd261 [file] [log] [blame] [view]
Ian Hicksonb5c6da12016-05-23 15:04:50 -07001# microbenchmarks
2
Ian Hickson92af3332016-09-22 14:26:24 -07003To run these benchmarks on a device, first run `flutter logs' in one
4window to see the device logs, then, in a different window, run any of
5these:
Ian Hicksonb5c6da12016-05-23 15:04:50 -07006
7```
LongCatIsLooongcea055e2020-08-12 13:31:05 -07008flutter run --release lib/gestures/velocity_tracker_bench.dart
Tong Mu03ed06f2019-06-28 00:37:01 -07009flutter run --release lib/gestures/gesture_detector_bench.dart
Ian Hickson411db2d2016-09-09 14:25:34 -070010flutter run --release lib/stocks/animation_bench.dart
11flutter run --release lib/stocks/build_bench.dart
12flutter run --release lib/stocks/layout_bench.dart
Ian Hicksonb5c6da12016-05-23 15:04:50 -070013```
14
15The results should be in the device logs.
LongCatIsLooongdb705b82020-08-19 00:41:06 -070016
17### Avoid changing names of the benchmarks
18
19Each microbenchmark is identified by a name, for example,
20"catmullrom_transform_iteration". Changing the name of an existing
21microbenchmarks will effectively remove the old benchmark and create a new one,
22losing the historical data associated with the old benchmark in the process.