summaryrefslogtreecommitdiff
path: root/internal/flags/flags_test.go
AgeCommit message (Collapse)Author
2026-05-21p7 add attach-time trace dimension gatingPaul Buetow
2026-05-13add TUIFastRefreshInterval flag to flags.ConfigPaul Buetow
Add TUIFastRefreshInterval time.Duration to flags.Config struct with a default of 250ms and register it as the -tui-fast-refresh CLI flag so callers can tune or disable the high-frequency TUI refresh cadence for the flamegraph and stream tabs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13fix: reject negative and zero -duration flag values with a clear errorPaul Buetow
A negative or zero -duration was silently accepted, causing the trace context to be cancelled immediately (time.Duration(N) * time.Second with N <= 0 yields a non-positive timeout), so no events were ever captured. parseFromFlagSet now returns an error for Duration <= 0, matching the existing pattern used for -resetTimer validation. Three new tests cover the negative, zero, and valid positive cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13replace global flags singleton with Parse() returning Config valuePaul Buetow
Remove the global atomic.Pointer[Config], sync.Once, and parseErr fields from the flags package. Parse() now returns (Config, error) directly, eliminating all global-state accessors (Get, SetPidFilter, SetTidFilter, SetTUIExportEnable, setCurrent, updateCurrent). The internal parse logic is factored into parseFromFlagSet so tests can inject a fresh FlagSet without touching os.Args or package-level state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09add auto-reset timer for dashboard aggregatesPaul Buetow
Live flamegraph trie and stats engine grow unboundedly during long traces. Add a periodic auto-reset (same effect as the 'r' key) so they stay bounded. - New CLI flag -resetTimer=30s (default 30s, 0 disables). - Hotkey I cycles the cadence: off -> 15s -> 30s -> 60s -> 5m -> off. Custom intervals (e.g. -resetTimer=47s) advance to the first preset greater than the current value, then wrap to off. - autoResetTickMsg carries a generation counter so changing the cadence drops in-flight ticks scheduled under the previous interval. - Dashboard chrome shows 'auto-reset: 30s' or 'auto-reset: off'.
2026-03-13feat: add headless parquet recording modePaul Buetow
2026-03-12fix: restore legacy flamegraph trace output modePaul Buetow
2026-03-06refactor: rename flags.Flags to flags.Config (task 383)Paul Buetow
2026-03-06refactor: remove web flamegrapher and keep TUI-onlyPaul Buetow
2026-03-06flamegraph: make esc undo one zoom level and aggregate syscalls by defaultPaul Buetow
2026-03-06Add live flamegraph test modes and dynamic synthetic live feedPaul Buetow
2026-03-05Refactor flags state to constructor-backed snapshotsPaul Buetow
2026-03-04Fix Go mistake findings and stabilize integration timingPaul Buetow
2026-03-03Add watch mode for dynamic flamegraph updatesPaul Buetow
2026-03-03Add WASM-ready flamegraph JSON exportPaul Buetow
2026-03-02Make --open a command template with no defaultsPaul Buetow
2026-03-02Add --open support for live flamegraph browser launchPaul Buetow
2026-03-01flags: return parse errors instead of exiting (task 321)Paul Buetow
2026-02-27flamegraph: default live update interval to 200msPaul Buetow
2026-02-27flags: change default flamegraph order to comm-firstPaul Buetow
2026-02-27internal: validate live CLI mode behaviorPaul Buetow