stats method
Get aggregate execution statistics.
Implementation
HookStats stats() {
return HookStats(
totalExecutions: _totalExecutions,
executionsByType: Map.unmodifiable(_executionsByType),
avgDuration: _totalExecutions == 0
? Duration.zero
: Duration(microseconds: _totalDurationMicros ~/ _totalExecutions),
failureCount: _failureCount,
abortCount: _abortCount,
lastExecution: _lastExecution,
executionsByHookId: Map.unmodifiable(_executionsByHookId),
);
}