expectedBenchmarkMetrics function

List<BenchmarkMetric> expectedBenchmarkMetrics({
  1. required bool useWasm,
})

The list of expected benchmark metrics for the current compilation mode, as determined by the value of useWasm.

Implementation

List<BenchmarkMetric> expectedBenchmarkMetrics({required bool useWasm}) {
  return <BenchmarkMetric>[
    // The skwasm renderer doesn't have preroll or apply frame steps in its
    // rendering.
    if (!useWasm) ...<BenchmarkMetric>[
      BenchmarkMetric.prerollFrame,
      BenchmarkMetric.applyFrame,
    ],
    BenchmarkMetric.drawFrame,
    BenchmarkMetric.flutterFrameTotalTime,
    BenchmarkMetric.flutterFrameBuildTime,
    BenchmarkMetric.flutterFrameRasterTime,
  ];
}