group function

void group(
  1. String name,
  2. void body()
)

Groups the benchmarks declared in body under name. Nested groups join their names with spaces. The benchmarks of a group are compared with the first one in it.

Implementation

void group(String name, void Function() body) {
  _groups.add(name);
  try {
    body();
  } finally {
    _groups.removeLast();
  }
}