AsyncBenchmark.from constructor

AsyncBenchmark.from(
  1. String name,
  2. Future<Object?> run(), {
  3. int size,
  4. Future<void> setup()?,
  5. Future<void> teardown()?,
})

Wraps run as a benchmark, with optional untimed setup and teardown.

Implementation

factory AsyncBenchmark.from(
  String name,
  Future<Object?> Function() run, {
  int size,
  Future<void> Function()? setup,
  Future<void> Function()? teardown,
}) = _FunctionAsyncBenchmark;