snapshot static method

Map<String, dynamic> snapshot()

JSON-serializable snapshot: {name: {us, ms, n}} in record order.

Implementation

static Map<String, dynamic> snapshot() {
  final out = <String, dynamic>{};
  for (final name in _order) {
    final e = _entries[name]!;
    out[name] = <String, dynamic>{
      'us': e.totalMicros,
      'ms': e.totalMicros / 1000.0,
      'n': e.count,
    };
  }
  return out;
}