commit | aae9841ba714737ee2e1559b66f46988a4e58c98 | [log] [tgz] |
---|---|---|
author | John McCutchan <john@johnmccutchan.com> | Wed Dec 19 13:18:10 2012 -0800 |
committer | John McCutchan <john@johnmccutchan.com> | Wed Dec 19 13:18:10 2012 -0800 |
tree | 9994ff1e6efa095c2e34eecacfd2152d70144af5 | |
parent | 2696917ea11bfd21bb59870c69ab90e085328347 [diff] |
Revert more detailed reporting change.
==========================
The Dart project benchmark harness is the recommended starting point when building a benchmark for Dart.
BenchmarkBase
class that all new benchmarks should extend
1. Add the following to your project's pubspec.yaml
dependencies: benchmark_harness: git: https://github.com/dart-lang/benchmark_harness.git
2. Install pub packages
pub install
3. Add the following import:
import 'package:benchmark_harness/benchmark_harness.dart';
4. Create a benchmark class which inherits from BenchmarkBase
// Import BenchmarkBase class. import 'package:benchmark_harness/benchmark_harness.dart'; // Create a new benchmark by extending BenchmarkBase class TemplateBenchmark extends BenchmarkBase { const TemplateBenchmark() : super("Template"); static void main() { new TemplateBenchmark().report(); } // The benchmark code. void run() { } // Not measured setup code executed prior to the benchmark runs. void setup() { } // Not measures teardown code executed after the benchark runs. void teardown() { } } main() { // Run TemplateBenchmark TemplateBenchmark.main(); }