VmBenchmarkOperation typedef

VmBenchmarkOperation = FutureOr<BenchmarkIteration> Function(int iteration, BenchmarkCancellationToken cancellation)

VM-only benchmark body invoked for warmups and measured repetitions.

The BenchmarkCancellationToken is cooperative; operations should check it before starting expensive I/O or CPU work.

Implementation

typedef VmBenchmarkOperation = FutureOr<BenchmarkIteration> Function(
  int iteration,
  BenchmarkCancellationToken cancellation,
);