effectiveSlowQueryThreshold property

Duration? get effectiveSlowQueryThreshold

Effective slow-query threshold. Returns the explicit slowQueryThreshold when set, otherwise 80% of queryTimeout when a query timeout exists, otherwise null (no events).

Implementation

Duration? get effectiveSlowQueryThreshold {
  if (slowQueryThreshold != null) return slowQueryThreshold;
  final timeout = queryTimeout;
  if (timeout == null || timeout <= Duration.zero) return null;
  return Duration(microseconds: (timeout.inMicroseconds * 0.8).round());
}