Table of Contents

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

threshold TimeSpan

The duration above which a command is reported as slow.

severity QueryGuardSeverity

How to react.

Returns

QueryGuardPolicy

A new policy.

Exceptions

ArgumentOutOfRangeException

threshold is negative.