benchmark_harness 1.0.1

  • README.md
  • Installing
  • Versions
  • --

Dart Benchmark Harness #

==========================

Introduction #

The Dart project benchmark harness is the recommended starting point when building a benchmark for Dart.

Features #

  • Two sample benchmarks (DeltaBlue & Richards)
  • Template benchmark that you can copy and paste when building new benchmarks

Getting Started #

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

Example #

// 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();
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  benchmark_harness: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:benchmark_harness/benchmark_harness.dart';
  
Version Uploaded Documentation Archive
1.0.5 Jul 26, 2018 Go to the documentation of benchmark_harness 1.0.5 Download benchmark_harness 1.0.5 archive
1.0.4 Feb 14, 2014 Go to the documentation of benchmark_harness 1.0.4 Download benchmark_harness 1.0.4 archive
1.0.3 Jan 10, 2014 Go to the documentation of benchmark_harness 1.0.3 Download benchmark_harness 1.0.3 archive
1.0.2 Dec 20, 2012 Go to the documentation of benchmark_harness 1.0.2 Download benchmark_harness 1.0.2 archive
1.0.1 Nov 26, 2012 Go to the documentation of benchmark_harness 1.0.1 Download benchmark_harness 1.0.1 archive
1.0.0 Nov 20, 2012 Go to the documentation of benchmark_harness 1.0.0 Download benchmark_harness 1.0.0 archive
Awaiting analysis to complete.