reportTimer method

void reportTimer(
  1. DateTime time,
  2. String name,
  3. Timer timer
)

Implementation

void reportTimer(DateTime time, String name, Timer timer) {
  final snapshot = timer.snapshot;
  _report(time, name, {
    'count': timer.count,
    'max': convertDuration(snapshot.max),
    'mean': convertDuration(snapshot.mean),
    'min': convertDuration(snapshot.min),
    'stddev': convertDuration(snapshot.stdDev),
    'p50': convertDuration(snapshot.median),
    'p75': convertDuration(snapshot.get75thPercentile()),
    'p95': convertDuration(snapshot.get95thPercentile()),
    'p98': convertDuration(snapshot.get98thPercentile()),
    'p99': convertDuration(snapshot.get99thPercentile()),
    'p999': convertDuration(snapshot.get999thPercentile()),
    'mean_rate': convertRate(timer.meanRate),
    'm1_rate': convertRate(timer.oneMinuteRate),
    'm5_rate': convertRate(timer.fiveMinuteRate),
    'm15_rate': convertRate(timer.fifteenMinuteRate),
    'rate_unit': 'calls/${rateUnit.name}',
    'duration_unit': '${durationUnit.name}s',
  });
}