aggregateRoundStats static method

DetailedBenchmarkStats aggregateRoundStats(
  1. List<DetailedBenchmarkStats> rounds
)

Aggregate multiple round stats by flattening all measured samples.

Implementation

static DetailedBenchmarkStats aggregateRoundStats(
  List<DetailedBenchmarkStats> rounds,
) {
  final allSamples = <double>[];
  var warmup = 0;
  for (final round in rounds) {
    warmup = round.warmupIterations;
    allSamples.addAll(round.samplesMs);
  }
  return summarizeSamples(allSamples, warmupIterations: warmup);
}