commit | 47213d0f625095335fb3f7a48b3acf03db95bffc | [log] [tgz] |
---|---|---|
author | John McCutchan <john@johnmccutchan.com> | Thu Nov 22 10:06:05 2012 -0800 |
committer | John McCutchan <john@johnmccutchan.com> | Thu Nov 22 10:06:05 2012 -0800 |
tree | 518a9d04511426125a0dbd25f8cf60484d54b0c5 | |
parent | 31b939e3e5ce20605fac212c406063e4f8e8ddf5 [diff] |
Keep all file names lower case. Signed-off-by: John McCutchan <john@johnmccutchan.com>
==========================
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(); }