Skip to content

Add cckr benchmarks - #7723

Draft
amadeuszl wants to merge 7 commits into
dotnet:mainfrom
amadeuszl:users/alechniak/benchmarking-cckr
Draft

amadeuszl wants to merge 7 commits into
dotnet:mainfrom
amadeuszl:users/alechniak/benchmarking-cckr

Conversation

@amadeuszl

@amadeuszl amadeuszl commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

It's based on CCKR implementation from #7676

Microsoft Reviewers: Open in CodeFlow

evgenyfedorov2 and others added 6 commits August 3, 2026 15:48
…etry

Implements the CCKR (Chao-Cohen-Kaplan-Reservoir) adaptive log sampler as implementations of the existing LoggingSampler and LogBuffer seams, so no changes to the logging pipeline are required:

- Cckr<TCallsite,TPayload>: bottom-(K+1) weighted reservoir with EXP ranks, cross-period inverse-frequency feedback, Chao1 unseen-weight, bounded novelty preserve, and Horvitz-Thompson sampling weights (faithful port of the reference algorithm).

- CckrLoggingSampler (LoggingSampler): the admit/drop decision. CckrLogBuffer (LogBuffer): holds admitted records per category and emits the kept records carrying the sampling.count weight at each flush, reusing SerializedLogRecord/DeserializedLogRecord/IBufferedLogger.

- AddCckrLogSampling registers one reservoir instance as both seams. Public API: AddCckrLogSampling, ReservoirSamplingConfig, UnseenWeightMode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6f4813fc-1522-4dd8-8788-b59b7d0a9ca0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants