Repository navigation
fix(watch): the test watch sparkline keeps the last 40 polls - #398
Merged
Merged
Conversation
The TUI path of `kates test watch` and `create --wait` appended every poll's throughput to the sparkline history and never dropped one. An hour into a run the sparkline was 1,823 columns wide, and the renderer cut off the live number printed after it. The history keeps the last 40 polls (sparklinePoints). TestPollModel_SparklineKeepsTheLastPoints feeds 100 polls and gets the last 40, oldest first.
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.
Item 1.12 of the CLI performance and stability plan (finding F19, the sparkline part). Independent of the other Wave 1 PRs.
Why
The TUI path of
kates test watchandkates test create --waitappends every poll's peak throughput to the sparkline history and never drops one (cli/cmd/watch.go:190on main, 6f4cf61). An hour into a run the sparkline was 1,823 columns wide (the plan's measurement), and the renderer cuts off the live number printed after it.cluster watchalready caps its history at 30.Changes
cli/cmd/watch.go: the history keeps the last 40 polls (sparklinePoints). The rest of F19, the pollers that overlap themselves and the port-forward repair that runs insideUpdate, is items 6.2 and 6.3.Tests
Added
TestPollModel_SparklineKeepsTheLastPoints: 100 RUNNING polls with throughputs 0 to 99 leave 40 points, 60 to 99. On main'swatch.goall 100 stay.Run locally, passing:
cd cli && go test ./...,go test -race ./cmd,go vet ./....golangci-lint run --new-from-rev=origin/main ./...: 0 issues.scripts/check-cli-style.shandscripts/check-cli-compat.sh: OK.cli/**triggers (Build & Test): this PR touches nothing underkates/../mvnw teston main'skates/tree ran 1,254 tests with 0 failures and 0 errors, once for all of Wave 1.Skipped locally:
govulncheck, asgo.modis unchanged.CI only:
./mvnw verifywith the*ITtests, the Kind and Docker jobs, CodeQL and Trivy.