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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 class CountTestConfig { | 428 class CountTestConfig { |
429 CountTestConfig(int this._warmup, int this._reps, | 429 CountTestConfig(int this._warmup, int this._reps, |
430 [int blocksize = -1, ReportHandler reportHandler = null]) { | 430 [int blocksize = -1, ReportHandler reportHandler = null]) { |
431 this._blocksize = blocksize; | 431 this._blocksize = blocksize; |
432 this._reportHandler = (null == reportHandler) ? | 432 this._reportHandler = (null == reportHandler) ? |
433 _(TestReport r) => r.printReport() : reportHandler; | 433 _(TestReport r) => r.printReport() : reportHandler; |
434 } | 434 } |
435 | 435 |
436 Function _reportHandler; | 436 Function _reportHandler; |
437 Function get reportHandler() => _reportHandler; | 437 Function get reportHandler => _reportHandler; |
438 int _warmup; | 438 int _warmup; |
439 int _reps; | 439 int _reps; |
440 int _blocksize; | 440 int _blocksize; |
441 } | 441 } |
442 | 442 |
443 class TimedTestConfig { | 443 class TimedTestConfig { |
444 TimedTestConfig(int this._warmup, int this._targetTimeMs, | 444 TimedTestConfig(int this._warmup, int this._targetTimeMs, |
445 [int minSampleTimeMs = 100, int blocksize = -1, | 445 [int minSampleTimeMs = 100, int blocksize = -1, |
446 ReportHandler reportHandler = null]) : | 446 ReportHandler reportHandler = null]) : |
447 this._minSampleTimeMs = minSampleTimeMs, | 447 this._minSampleTimeMs = minSampleTimeMs, |
448 this._blocksize = blocksize { | 448 this._blocksize = blocksize { |
449 this._reportHandler = (null == reportHandler) ? | 449 this._reportHandler = (null == reportHandler) ? |
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 |