Repository navigation
tools: add traceReuseStat (reuse-locality profile, sigma_cross) + doc - #6
Open
lindicaphxag-tech wants to merge 7 commits into
Open
lindicaphxag-tech wants to merge 7 commits into
lindicaphxag-tech wants to merge 7 commits into
Conversation
…xplicit quantile error
…xplicit quantile error
…force checks in Release builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tools/traceReuseStat, a single-pass CLI that reads a TraceReader (*.lcp/.lcp.zst) and reports reuse locality metrics that none of the existing tools expose:sigma_cross: share of reuse accesses (distinct-block hit) whose previous accessor belongs to a different request stream (session). This is the quantity that decides whether cross-tenant memory is worth caching.user_idis present.--gap-histand--per-request-outfor downstream plotting/aggregation.Motivation:
tracePrintgives totals andprefixsimgives simulated hit ratios, but neither tells you who the reuse comes from. In our measurements the same eviction policy is +24.6% on one workload and +0.014 pp / -1.70 pp on two public production traces; the discriminating variable is sigma_cross, which costs one pass over the trace to obtain.No behaviour change for existing targets; new target is built only when the corresponding source is present. Smoke-tested on the small traces in
data/(handles traces without a session field by reporting sigma_cross = 0 and same-session share = 1.0).