
CountingTokenSink
- Namespace
- Rowles.LeanCorpus.Analysis.Analysers
- Assembly
- Rowles.LeanCorpus.dll
An ISpanTokenSink that counts accepted tokens without allocating any strings or Token objects. Use for performance measurement of the analysis pipeline when only throughput matters, not the tokens themselves.
public sealed class CountingTokenSink : ISpanTokenSink
- Inheritance
-
CountingTokenSink
- Implements
Count
Gets the number of tokens accepted since the last Reset().
Add(ReadOnlySpan<char>, int, int, string, int, byte[]?)
Adds a token to the sink.
Reset()
Resets the token count to zero.