| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:math'; | |
| 6 | |
| 7 import 'package:front_end/src/fasta/outline.dart' as outline; | 5 import 'package:front_end/src/fasta/outline.dart' as outline; |
| 8 | 6 |
| 9 import 'standard_deviation.dart'; | 7 import 'standard_deviation.dart'; |
| 10 | 8 |
| 11 const int iterations = const int.fromEnvironment("iterations", defaultValue: 1); | 9 const int iterations = const int.fromEnvironment("iterations", defaultValue: 1); |
| 12 | 10 |
| 13 main(List<String> arguments) async { | 11 main(List<String> arguments) async { |
| 14 // Timing results for each iteration | 12 // Timing results for each iteration |
| 15 List<double> elapseTimes = <double>[]; | 13 List<double> elapseTimes = <double>[]; |
| 16 | 14 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 40 | 38 |
| 41 // Calculate the standard deviation of the mean | 39 // Calculate the standard deviation of the mean |
| 42 double stdDevOfTheMean = standardDeviationOfTheMean(warmTimes, stdDev); | 40 double stdDevOfTheMean = standardDeviationOfTheMean(warmTimes, stdDev); |
| 43 | 41 |
| 44 print('Summary:'); | 42 print('Summary:'); |
| 45 print(' Elapse times: $elapseTimes'); | 43 print(' Elapse times: $elapseTimes'); |
| 46 print(' Cold start (first run): ${elapseTimes[0]}'); | 44 print(' Cold start (first run): ${elapseTimes[0]}'); |
| 47 print(' Warm run average (runs #4 to #$iterations): $mean'); | 45 print(' Warm run average (runs #4 to #$iterations): $mean'); |
| 48 print(' Warm run standard deviation of the mean: $stdDevOfTheMean'); | 46 print(' Warm run standard deviation of the mean: $stdDevOfTheMean'); |
| 49 } | 47 } |
| OLD | NEW |