You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Follow-up to PR #647, which was merged at the round-1 commit before
round-2 review fixes propagated. This PR carries the orphaned round-2
changes:
- New `--keyvizHistoryColumns` flag (defaults to
`keyviz.DefaultHistoryColumns = 1440`, i.e. 24h at 60s) so operators can
shorten the ring buffer for high-cardinality clusters without
rebuilding.
- `startKeyVizFlusher` early-returns when the sampler is nil instead of
spawning a goroutine that just parks on `ctx.Done` — the goroutine was
harmless but had no signal.
- TODO on `observeMutation` documenting the Phase-2 read-sampling
milestone (design §5.1, §10) so future readers don't think the missing
read path is a regression. Until that wiring lands the matrix's
`Reads`/`ReadBytes` series stay zero.
These items came out of Claude bot's round-2 review of #647 but landed
after the merge button was pressed.
## Test plan
- [x] `go build .`, `go vet .`, `golangci-lint run ./...` clean.
- [x] `go test -race -count=1 -run
'TestBuildKeyVizSampler|TestSeedKeyVizRoutes|TestStartKeyVizFlusher' .`
clean.
Copy file name to clipboardExpand all lines: main.go
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,7 @@ var (
135
135
keyvizStep=flag.Duration("keyvizStep", keyviz.DefaultStep, "Flush interval / matrix-column resolution for the keyviz sampler")
136
136
keyvizMaxTrackedRoutes=flag.Int("keyvizMaxTrackedRoutes", keyviz.DefaultMaxTrackedRoutes, "Maximum routes tracked individually before excess routes coarsen into virtual buckets")
137
137
keyvizMaxMemberRoutesPerSlot=flag.Int("keyvizMaxMemberRoutesPerSlot", keyviz.DefaultMaxMemberRoutesPerSlot, "Maximum members listed on a virtual bucket; excess routes still drive the bucket counters")
138
+
keyvizHistoryColumns=flag.Int("keyvizHistoryColumns", keyviz.DefaultHistoryColumns, "Maximum matrix columns retained in the keyviz ring buffer (each column = one Step)")
0 commit comments