benchMark static method

Future<void> benchMark(
  1. Future<void> code()
)

Implementation

static Future<void> benchMark(Future<void> Function() code) async {

  final watch = Stopwatch()..start();

  await code();

  watch.stop();
  print("Benchmark: ${watch.elapsedMilliseconds}ms");
}