Table of Contents

Public classSealed SlowQueryLog

Namespace
Rowles.LeanLucene.Diagnostics
Assembly
Rowles.LeanLucene.dll

Logs individual queries that exceed a configurable latency threshold. Output is one JSON object per line (JSON Lines format).

public sealed class SlowQueryLog : IDisposable
SlowQueryLog

Constructors

Public constructor SlowQueryLog(double, TextWriter, bool)

Creates a slow query log that writes to the given System.IO.TextWriter.

Properties

Public property IncludeExplain

Whether to include query explain output in log entries.

Public propertyRead-only ThresholdMs

Minimum elapsed milliseconds before a query is logged.

Methods

Public method Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Internal methodInternal MaybeLog(Query, TimeSpan, int)

Records a query execution. If elapsed exceeds the threshold, writes a JSON line to the output.

Public methodStatic ToFile(double, string)

Creates a slow query log that appends to a file.