Skip to content

fix(trace): rename TotalCompactions to MaxCompactions - #21

Open
MrBeldum wants to merge 1 commit into
loop-eng:mainfrom
MrBeldum:fix/12-rename-max-compactions
Open

fix(trace): rename TotalCompactions to MaxCompactions#21
MrBeldum wants to merge 1 commit into
loop-eng:mainfrom
MrBeldum:fix/12-rename-max-compactions

Conversation

@MrBeldum

Copy link
Copy Markdown

Summary

  • Renames TotalCompactions()MaxCompactions() so the API matches the max aggregation (issue acceptance: rename or document; PR Document TotalCompactions() running-counter semantics #17 documents — this takes the rename path).
  • Documents that ContextState.Compactions is a running counter (so max == total observed).
  • Adds unit tests for max-of-running-counter, empty trace, and out-of-order iterations.
  • Updates classifier and CLI call sites.

Test plan

  • go test ./internal/trace/ ./internal/classifier/
  • CI green on this PR

Fixes #12

ContextState.Compactions is a running counter, so aggregating with max is
correct; the old TotalCompactions name was misleading. Rename to
MaxCompactions per issue acceptance, document the field, and add tests.

Fixes loop-eng#12
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.

TotalCompactions() returns max not sum — name is misleading

1 participant