benchmarkSet<R> function

List<BenchmarkResult<R>> benchmarkSet<R>(
  1. int loops,
  2. Map<String, BenchMarkFunction<R>> set
)

Performas a benchmark of a set of BenchMarkFunctions.

Implementation

List<BenchmarkResult<R>> benchmarkSet<R>(
    int loops, Map<String, BenchMarkFunction<R>> set) {
  var results = set.entries.map((e) {
    var result = benchmark(e.key, loops, e.value);
    return result;
  }).toList();
  results.sort();
  return results;
}