IMetricsCollector
- Namespace
- Rowles.LeanCorpus.Diagnostics
- Assembly
- Rowles.LeanCorpus.dll
Interface for collecting operational metrics from IndexSearcher, IndexWriter, and QueryCache.
public interface IMetricsCollector
GetSnapshot()
Takes a point-in-time snapshot of all metrics.
RecordCacheHit()
Records a query cache hit.
RecordCacheMiss()
Records a query cache miss.
RecordCodecFlush(string, TimeSpan, long)
Records one codec contribution to a segment flush.
RecordCommit(TimeSpan)
Records a commit event.
RecordDeleteApplication(TimeSpan, int, int)
Records a delete-application phase.
RecordFileSync(TimeSpan, long, int)
Records physical file synchronisation performed by a durable commit.
RecordFlush(TimeSpan)
Records a segment flush event.
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.
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.
RecordMerge(TimeSpan, int)
Records a segment merge event.
RecordMergeBacklog(long, TimeSpan)
Records queued merge work and producer stall time.
RecordSearchLatency(TimeSpan)
Records a search latency sample.
RecordWriterMemory(long, long, long)
Records writer-owned active and flushing memory.