Ian Hickson | b5c6da1 | 2016-05-23 15:04:50 -0700 | [diff] [blame] | 1 | # microbenchmarks |
| 2 | |
Ian Hickson | 92af333 | 2016-09-22 14:26:24 -0700 | [diff] [blame] | 3 | To run these benchmarks on a device, first run `flutter logs' in one |
| 4 | window to see the device logs, then, in a different window, run any of |
| 5 | these: |
Ian Hickson | b5c6da1 | 2016-05-23 15:04:50 -0700 | [diff] [blame] | 6 | |
| 7 | ``` |
LongCatIsLooong | cea055e | 2020-08-12 13:31:05 -0700 | [diff] [blame] | 8 | flutter run --release lib/gestures/velocity_tracker_bench.dart |
Tong Mu | 03ed06f | 2019-06-28 00:37:01 -0700 | [diff] [blame] | 9 | flutter run --release lib/gestures/gesture_detector_bench.dart |
Ian Hickson | 411db2d | 2016-09-09 14:25:34 -0700 | [diff] [blame] | 10 | flutter run --release lib/stocks/animation_bench.dart |
| 11 | flutter run --release lib/stocks/build_bench.dart |
| 12 | flutter run --release lib/stocks/layout_bench.dart |
Ian Hickson | b5c6da1 | 2016-05-23 15:04:50 -0700 | [diff] [blame] | 13 | ``` |
| 14 | |
| 15 | The results should be in the device logs. |
LongCatIsLooong | db705b8 | 2020-08-19 00:41:06 -0700 | [diff] [blame] | 16 | |
| 17 | ### Avoid changing names of the benchmarks |
| 18 | |
| 19 | Each microbenchmark is identified by a name, for example, |
| 20 | "catmullrom_transform_iteration". Changing the name of an existing |
| 21 | microbenchmarks will effectively remove the old benchmark and create a new one, |
| 22 | losing the historical data associated with the old benchmark in the process. |