feat: argus gcwhy — narrate the worst recent GC pause#155
Merged
Conversation
New command: argus gcwhy <gc-log-file> [--last=5m] [--format=json]. Picks the single worst pause inside the lookback window and emits up to three natural-language "why" bullets plus a related-counters block. Rule engine applies ordered checks over the target event and preceding events in the window: explicit System.gc(), G1 humongous allocation, Metaspace pressure, Full GC fallback (concurrent-mode / evacuation failure), allocation burst vs recent baseline, high heap occupancy, and outlier-pause detection. Falls back to a neutral one-line summary when nothing anomalous is detected. Log-based in v1, matching gcscore. Live PID/target mode is deferred to a follow-up once the server exposes per-event histograms over /prometheus. New files: - argus-cli/src/main/java/io/argus/cli/gcwhy/GcWhyResult.java - argus-cli/src/main/java/io/argus/cli/gcwhy/GcWhyAnalyzer.java - argus-cli/src/main/java/io/argus/cli/command/GcWhyCommand.java - argus-cli/src/test/java/io/argus/cli/gcwhy/GcWhyAnalyzerTest.java Updated: - ArgusCli command registration - i18n (en, ko, ja, zh) cmd.gcwhy.desc / header.gcwhy / desc.gcwhy - Shell completions (bash, zsh, fish, ps1) Closes #151. Signed-off-by: rlaope <piyrw9754@gmail.com>
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.
Closes #151.
Summary
argus gcwhy <gc-log-file> [--last=5m]picks the single worst pause in the lookback window and emits up to three plain-English "why" bullets plus a related-counters block.Sample output:
Rule engine (ordered)
System.gc()triggerEmits the top three triggered bullets (ordered). Always at least one bullet.
Scope
GcLogParser, filters events to--last=Nmwindow--format=jsonfor automation--lastacceptsNs,Nm,Nhor a bare number in seconds; default 5mNon-goals in this PR
/prometheusthat are not yet exposed.References (design lineage)
Test plan
./gradlew :argus-cli:test --tests io.argus.cli.gcwhy.*— passes./gradlew :argus-cli:testfull suite — passes