summaryrefslogtreecommitdiff
path: root/internal/tui/flamegraph
AgeCommit message (Collapse)Author
2026-05-13refactor: make receiver types consistent per type (pointer receivers)Paul Buetow
fileRankHeap Len/Less/Swap converted to pointer receivers to match Push/Pop; bubbleChart HasNodes and AnimationState Settled converted to pointer receivers to match all other methods on their types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13perf: replace string += concatenation with strings.Builder in TUI render hot ↵Paul Buetow
paths Swap out ad-hoc += string concatenation in the flamegraph toolbar/status lines, dashboard filter summary, bubble/treemap status lines, eventstream view, processes tab, and probes list for strings.Builder, eliminating redundant allocations on every render tick. Also update dashboard/model_test.go fake SnapshotSource implementations to match the updated interface signature. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13enforce gofmt formatting and add Fmt/FmtCheck mage targetsPaul Buetow
Run gofmt -w on 9 files that had minor alignment/whitespace drift (pair.go, filter.go, ior_mode_registry.go, ior_mode_test.go, runtime.go, engine.go, dashboard/model.go, flamegraph/model.go, flamegraph/renderer.go). Add two new Mage targets to Magefile.go: - `mage fmt` – rewrites all .go files in-place via go/format - `mage fmtCheck` – dry-run check; fails with a list of offending files, suitable as a CI gate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12add compile-time interface satisfaction assertions for public typesPaul Buetow
Add var _ Interface = (*ConcreteType)(nil) assertions for: - *flamegraph.LiveTrie → runtime.{Snapshotter,Configurator,LiveTrieSource} and tui/flamegraph.{Snapshotter,Configurator,LiveTrieSource} - *probemanager.Manager → runtime.ProbeManager - *statsengine.Engine → runtime.SnapshotSource - *streamrow.RingBuffer → runtime.EventSink - *runtimeBindings (tui) → runtime.TraceRuntimeBindings - *lateBoundDashboardSource → dashboard.SnapshotSource - libbpfTracepointProgram/Module → probemanager.{Program,Attacher} Assertions are grouped close to their interface definitions to avoid introducing new import cycles (runtime already imports all affected packages; tui/flamegraph already imports coreflamegraph). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12split LiveTrieSource into Snapshotter and Configurator (ISP)Paul Buetow
Applies the Interface Segregation Principle to LiveTrieSource in both internal/runtime and internal/tui/flamegraph. The monolithic interface is replaced by two focused sub-interfaces — Snapshotter (read-only: Version, SnapshotJSON, SnapshotTree) and Configurator (mutating: Fields, CountField, Reconfigure, SetCountField, Reset) — which LiveTrieSource then embeds so all existing consumers continue to compile unchanged. The buildSnapshotMsg helper is narrowed to Snapshotter since it only reads snapshot data, preventing accidental mutation from the background goroutine. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12refactor flamegraph TUI model into focused sub-controllersPaul Buetow
Break the god-class Model in internal/tui/flamegraph/model.go into four focused sub-controllers that each own a single concern: - ZoomNavigator : zoom path, stack, root node, and reset/undo logic - SelectionManager: selected frame index, clamp, traversal, navigation - FrameAnimator : spring animation, frame layout swap, ancestry index - SearchController: search query, match indices, filter-visible set All four are embedded in Model so existing field access (m.selectedIdx, m.zoomPath, etc.) is promoted unchanged, keeping tests and callers intact. Model methods now delegate to the sub-controllers rather than holding all logic inline. Also split RenderTerminalView (88 lines) into computeRenderParams, buildToolbar, buildFilteredStatus, and buildNormalStatus helpers, and extracted buildSnapshotMsg from RefreshFromLiveTrieCmd. All functions are now ≤ 50 lines. All tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12refactor flamegraph model.go: split Update and frameIndexAt below 50-line limitPaul Buetow
Extract handleSearchInput and handleKeyNavigation from Update (111 lines → 33), then split handleKeyNavigation into handleModeKey and handleMovementKey. Extract frameCoordToTargetRow and findFrameAtRow from frameIndexAt (66 lines → 32). All new helpers are ≤ 29 lines; behavior is preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11speed up flame graph TUI under heavy event loadPaul Buetow
Move the per-tick snapshot refresh off the Bubble Tea update goroutine, add a frame ancestry index so navigation and filter helpers run in O(subtree) instead of O(frames), skip refresh and animation while the user is actively pressing keys, and memoize View() output. Keystrokes (pause, filter, navigate) now land within one frame even when the live trie ingests thousands of events per tick. - new SnapshotTree() on LiveTrie bypasses JSON marshal+unmarshal - RefreshFromLiveTrieCmd runs SnapshotTree + layout + ancestry on a background goroutine, coalesced via refreshInFlight, and returns a flameSnapshotReadyMsg the Update loop applies cheaply - driveWindow gate (250 ms after last key press) skips refresh dispatch and snaps frames directly to target without animation while the user is driving - View() caches its rendered string keyed on the inputs that affect output; cache is bypassed during animation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08add duration metric, tolerate missing tracepoints, ship el8 buildPaul Buetow
- Bubbles, treemap, icicle, and the live flamegraph 'b' cycle now include syscall duration (sum) as a third metric alongside events and bytes. Statsengine snapshots expose TotalLatencyNs to support this. - AttachAll takes an optional warn callback. Production passes one so older kernels that lack newer tracepoints log a warning and keep going instead of aborting startup. - Dockerfile.el8 + scripts/build-with-docker-el8.sh + mage buildDockerEl8 produce ior.el8, a static binary built against Rocky Linux 8 glibc for RHEL/Rocky/Alma 8 hosts. - README.md documents installing mage and the new el8 target.
2026-03-18cleanupPaul Buetow
2026-03-10tui/flamegraph: tighten arrow escape parsing (task 423)Paul Buetow
2026-03-10tui/flamegraph: centralize animation tick scheduling (task 422)Paul Buetow
2026-03-09tui: harden paused flame renderingPaul Buetow
2026-03-09tui: fix flamegraph click re-rootingPaul Buetow
2026-03-09tui: use full width for zoomed flame barsPaul Buetow
2026-03-09tui: remove flame selected underlinePaul Buetow
2026-03-08tui: reserve p for pid pickerPaul Buetow
2026-03-06fix(tui): restore bubble modes and stabilize flame zoom lineagePaul Buetow
2026-03-06feat(tui): add flamegraph click lineage undo and scope quit keyPaul Buetow
2026-03-06refactor: make livetrie caller-owned for pair recycling (task 382)Paul Buetow
2026-03-06refactor: use interfaces for TUI runtime binding sources (task 382)Paul Buetow
2026-03-06feat(tui): add flamegraph bytes metric togglePaul Buetow
2026-03-06flamegraph: use full viewport with capped bar height and preserve footer/statusPaul Buetow
2026-03-06flamegraph: keep non-matches visible in filter and add pgup/pgdn selection jumpsPaul Buetow
2026-03-06flamegraph: make esc undo one zoom level and aggregate syscalls by defaultPaul Buetow
2026-03-06Fix real live flamegraph key handling and startup viewport syncPaul Buetow
2026-03-06Add live flamegraph test modes and dynamic synthetic live feedPaul Buetow
2026-03-06Fix flamegraph navigation, filtering, and system-share feedbackPaul Buetow
2026-03-06Keep flame children visible under heavy rounding and clarify filter percentPaul Buetow
2026-03-06Start flame ticks on dashboard entry and use purple selectionPaul Buetow
2026-03-06Keep flame selection visible and improve arrow-key fallbackPaul Buetow
2026-03-06Improve flamegraph selection, filter, and zoom feedbackPaul Buetow
2026-03-05Normalize Go import grouping with local ior sectionPaul Buetow
2026-03-05Add package-level docs across internal packagesPaul Buetow
2026-03-05Make flame tab default and fix flame hotkey routingPaul Buetow
2026-03-05Reduce flamegraph hot-path allocationsPaul Buetow
2026-03-05Add race-safe flamegraph stress testsPaul Buetow
2026-03-05Add flamegraph benchmark suite and reuse hot-path buffersPaul Buetow
2026-03-05task 367: add flamegraph benchmark fixture generatorsPaul Buetow
2026-03-05task 365: animate flamegraph layout on resizePaul Buetow
2026-03-05task 364: animate flamegraph zoom transitionsPaul Buetow
2026-03-05task 363: animate flamegraph data refresh transitionsPaul Buetow
2026-03-05task 362: add flamegraph harmonica animation statePaul Buetow
2026-03-05task 361: add flamegraph control actions and toolbarPaul Buetow
2026-03-05task 360: add flamegraph search and match navigationPaul Buetow
2026-03-05task 359: add flamegraph zoom interactionsPaul Buetow
2026-03-05task 358: add flamegraph keyboard navigationPaul Buetow
2026-03-05task 357: add flamegraph subtree highlightingPaul Buetow
2026-03-05task 356: implement flamegraph terminal view rendererPaul Buetow
2026-03-05task 355: add terminal flamegraph layout rendererPaul Buetow