Method WithSlowQueryThreshold
- Namespace
- QueryGuard
- Assembly
- QueryGuard.Core.dll
WithSlowQueryThreshold(TimeSpan, QueryGuardSeverity)
Reports any single command slower than the given threshold.
public QueryGuardPolicy WithSlowQueryThreshold(TimeSpan threshold, QueryGuardSeverity severity = QueryGuardSeverity.Warning)
Parameters
thresholdTimeSpanThe duration above which a command is reported as slow.
severityQueryGuardSeverityHow to react.
Returns
- QueryGuardPolicy
A new policy.
Exceptions
- ArgumentOutOfRangeException
thresholdis negative.