| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
| 6 * The results of a single block of tests (count times run, overall time). | 6 * The results of a single block of tests (count times run, overall time). |
| 7 */ | 7 */ |
| 8 class BlockSample { | 8 class BlockSample { |
| 9 BlockSample(this.count, this.durationNanos); | 9 BlockSample(this.count, this.durationNanos); |
| 10 int count; | 10 int count; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 String _rightAlign(String s, int width) { | 176 String _rightAlign(String s, int width) { |
| 177 List<int> outCodes = []; | 177 List<int> outCodes = []; |
| 178 outCodes.insertRange(0, width, spaceChar); | 178 outCodes.insertRange(0, width, spaceChar); |
| 179 outCodes.setRange(Math.max(0, width - s.length), Math.min(width, s.length), | 179 outCodes.setRange(Math.max(0, width - s.length), Math.min(width, s.length), |
| 180 s.charCodes()); | 180 s.charCodes()); |
| 181 return new String.fromCharCodes(outCodes); | 181 return new String.fromCharCodes(outCodes); |
| 182 } | 182 } |
| 183 | 183 |
| 184 static String _stringifyDoubleAsInt(double val) { | 184 static String _stringifyDoubleAsInt(double val) { |
| 185 if (val.isInfinite() || val.isNaN()) { | 185 if (val.isInfinite || val.isNaN) { |
| 186 return "NaN"; | 186 return "NaN"; |
| 187 } else { | 187 } else { |
| 188 return val.toInt().toString(); | 188 return val.toInt().toString(); |
| 189 } | 189 } |
| 190 } | 190 } |
| 191 | 191 |
| 192 String id; | 192 String id; |
| 193 String desc; | 193 String desc; |
| 194 List<BlockSample> warmup; | 194 List<BlockSample> warmup; |
| 195 List<BlockSample> results; | 195 List<BlockSample> results; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 _(TestReport r) => r.printReport() : reportHandler; | 450 _(TestReport r) => r.printReport() : reportHandler; |
| 451 } | 451 } |
| 452 | 452 |
| 453 Function _reportHandler; | 453 Function _reportHandler; |
| 454 Function get reportHandler => _reportHandler; | 454 Function get reportHandler => _reportHandler; |
| 455 int _warmup; | 455 int _warmup; |
| 456 int _targetTimeMs; | 456 int _targetTimeMs; |
| 457 int _minSampleTimeMs; | 457 int _minSampleTimeMs; |
| 458 int _blocksize; | 458 int _blocksize; |
| 459 } | 459 } |
| OLD | NEW |