p-hatan/ mirror

pub repository

mirror.p-hatan.com

benchmark_harness

1.0.0

The official Dart project benchmark harness.

Download archive

Readme

Dart Benchmark Harness

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

Introduction

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

Features

  • BenchmarkBase class that all new benchmarks should extend
  • 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();
}
Changelog

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add benchmark_harness
pubspec.yaml
name: benchmark_harness
version: 1.0.0
description: The official Dart project benchmark harness.
author: Dart Project
homepage: http://www.dartlang.org

Version history

VersionPublishedArchiveSHA-256
1.0.02012-11-20T20:35:57.470500ZDownloadc1b39858cd0c644f2e77392000bb7e113f45ab7fe43fd9c15cd85294672e5208
1.0.12012-11-26T23:35:52.164560ZDownload12f16523a9c17a0d01d6eabd453e7326c6abf26b02a117a6eee1bde71a420f7c
1.0.22012-12-20T15:32:37.592300ZDownload806298d7f0cad8ffdd715a895cf1f7b151467b71643bc80724e5f05171eabb87
1.0.32014-01-10T22:18:23.017320ZDownload47e42ab30e48c056c5e603d4d15cc887ce48470584cdaec25f202adb31aef42c
1.0.42014-02-14T00:59:26.997070ZDownload992f666f3412d7c1c6fd3de835be43259213c20e702cbf98106cd0feeb4e96d1
1.0.52018-07-26T18:22:56.907758ZDownload811240744c8065bdfb5b95bea83a1b565acdf73bfc29bcadb590d66dd7687c4c
2.0.0-nullsafety.02020-11-10T23:36:44.597010ZDownload72ea8bcf1d71764571cc72969a7187123e15becc528dbba11d53ad9f5c86df84
2.0.02021-02-05T20:58:47.672178ZDownloade8e153466b38af37038a23a94c94618b864038f4163156f7d06b8b7ebfda76b0
2.1.02022-05-03T12:16:52.401589ZDownload72b770741a03b657bf830bda92682f8e1c8d1c459ff2859168f0cb737d00da0d
2.2.02022-07-06T10:54:03.351406ZDownload200beeddb5e8b3611ebb0bc8a730d63967afc3c9a5898791245eb46712a83a24
2.2.12023-02-02T16:09:31.837887ZDownload683bdcf9d96ec6f244d383a8b07f329fe64f0d3ef51739b82417ce904dd29d03
2.2.22023-05-08T23:55:08.922857ZDownloada12bc021ec45c05f60ad65a6cec1be881d4d84842699b2c4f4aa59f1089de242
2.2.32024-04-19T10:55:50.052240ZDownloadb0a9b0f6d3ac39f372c17494716acb39bf9517a789217b7f28256eb0ca011872
2.3.12024-10-29T14:44:27.000066ZDownload83f65107165883ba8623eb822daacb23dcf9f795c66841de758c9dd7c5a0cf28
2.4.02025-11-25T22:05:59.874420ZDownloada2d3c4c83cac0126bf38e41eaf7bd9ed4f6635f1ee1a0cbc6f79fa9736c62cbd

Dependencies

No direct dependencies declared.