Section navigation

Public interface IMetricsCollector

Namespace
Rowles.LeanCorpus.Diagnostics
Assembly
Rowles.LeanCorpus.dll

Interface for collecting operational metrics from IndexSearcher, IndexWriter, and QueryCache.

public interface IMetricsCollector

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 RecordCodecFlush(string, TimeSpan, long)

Records one codec contribution to a segment flush.

Public method RecordCommit(TimeSpan)

Records a commit event.

Public method RecordDeleteApplication(TimeSpan, int, int)

Records a delete-application phase.

Public method RecordFileSync(TimeSpan, long, int)

Records physical file synchronisation performed by a durable commit.

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 RecordMergeBacklog(long, TimeSpan)

Records queued merge work and producer stall time.

Public method RecordSearchLatency(TimeSpan)

Records a search latency sample.

Public method RecordWriterMemory(long, long, long)

Records writer-owned active and flushing memory.