Table of Contents

Public classSealed DefaultMetricsCollector

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

Lock-free metrics collector using Interlocked operations.

public sealed class DefaultMetricsCollector : IMetricsCollector
DefaultMetricsCollector
Implements

Public method GetSnapshot()

Takes a point-in-time snapshot of all metrics.

Public method RecordCacheHit()

Records a query cache hit.

Public method RecordCacheMiss()

Records a query cache miss.

Public method RecordCommit(TimeSpan)

Records a commit event.

Public method RecordFlush(TimeSpan)

Records a segment flush event.

Public method RecordHnswBuild(TimeSpan, int)

Records a single HNSW graph build (flush or merge). nodes is the number of vectors inserted. Default implementation is a no-op for backwards compatibility.

Public method RecordHnswSearch(TimeSpan, int)

Records a single HNSW graph traversal. nodesVisited is the number of distinct nodes visited during the layer-zero search and is the primary recall-vs-cost signal. Default implementation is a no-op for backwards compatibility.

Public method RecordMerge(TimeSpan, int)

Records a segment merge event.

Public method RecordSearchLatency(TimeSpan)

Records a search latency sample.