summaryrefslogtreecommitdiff
path: root/internal/statsengine
AgeCommit message (Collapse)Author
2026-05-239c move Non-IO grouping policy from core stats/types into dashboardPaul Buetow
Snapshot.NonIOFamilies, Snapshot.NonIOFamiliesCount, and types.IsNonIOSyscallFamily encoded a TUI tab concept in core packages. Move this filtering into internal/tui/dashboard/nonio.go as unexported helpers so the dashboard owns its own grouping policy and Snapshot.Families remains the neutral core API. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20feat: add syscall aggregate sampling infrastructure (task 17)Paul Buetow
2026-05-20task 07: add KindMem and separate address-space byte accountingPaul Buetow
2026-05-18t6 add syscall family dashboard aggregationPaul Buetow
2026-05-13introduce Accumulator interface in statsengine to separate ingestion from ↵Paul Buetow
snapshot-building Define statsengine.Accumulator (Ingest + Reset) to represent the event-accumulation responsibility separately from runtime.SnapshotSource (Snapshot), which handles the read side. This reduces the SRP violation in Engine: callers that only push events now hold an Accumulator; callers that only read statistics hold a SnapshotSource. - Add Accumulator interface and compile-time assertion in statsengine/engine.go - Add EventIngester type alias (= statsengine.Accumulator) in runtime/runtime.go with a compile-time assertion, so callers in the runtime layer can reference the ingestion contract without importing statsengine directly - Split tuiRuntime.engine field into accumulator + snapSource so the event-loop callback holds Accumulator and wireRuntimeBindings passes SnapshotSource to SetDashboardSnapshotSource — making each consumer's dependency explicit - Simplify resetDashboardSnapshotSource in tui.go to cast for interface{ Reset() } independently of Snapshot(), removing the combined ad-hoc interface check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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-13use errgroup instead of WaitGroup for concurrent snapshot buildersPaul Buetow
Replace sync.WaitGroup with errgroup.Group in buildSubSnapshots so errors from sub-builders (buildSyscallSnapshots, buildFileSnapshots, buildProcessSnapshots, buildHistogramSnapshot) are captured and propagated rather than silently dropped. Change Engine.Snapshot() to return (*Snapshot, error), update runtime.SnapshotSource and dashboard.SnapshotSource interfaces accordingly, and adjust all callers in tui.go, dashboard/model.go, and the test helpers. Each sub-builder now returns (result, error); the error return is currently always nil but establishes the contract for future validation. The per-type Snapshot() convenience methods (histogram, syscall, file, process) panic on error since they are internal helpers where failure would be a programming bug. 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 DefaultTopN constant to statsengine and replace hard-coded 64 capacity ↵Paul Buetow
values Introduces statsengine.DefaultTopN = 64 as the canonical named constant for the top-N capacity used when constructing an Engine. Removes the local defaultEngineCapacity constant from runtime_builder.go and updates all call sites to reference statsengine.DefaultTopN instead of bare 64. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12refactor: split Snapshot in statsengine to comply with 50-line limitPaul Buetow
Extract captureSnapshotInputs (lock-guarded state copy), buildSubSnapshots (concurrent per-category builders), and populateSnapshotFields (scalar field assignment) from the monolithic Snapshot method. The method itself is now 18 lines; all three helpers are well under 30 lines each. Co-Authored-By: Claude Sonnet 4.6 <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-08tests: remove sleep-based waits in tui and runtime testsPaul Buetow
2026-03-05Normalize Go import grouping with local ior sectionPaul Buetow
2026-03-05Add package-level docs across internal packagesPaul Buetow
2026-02-25Fix stream paused scrolling and apply pending TUI/probe updatesPaul Buetow
2026-02-25Parallelize snapshot builders in stats enginePaul Buetow
2026-02-24statsengine: deduplicate topN helpers with genericsPaul Buetow
2026-02-24statsengine: add top-n snapshot helpers for overviewPaul Buetow
2026-02-24statsengine: compact process accumulator at high cardinalityPaul Buetow
2026-02-24statsengine: cache syscall percentiles between snapshotsPaul Buetow
2026-02-24statsengine: build snapshots outside engine mutexPaul Buetow
2026-02-24statsengine: stop cloning snapshot accessors on readsPaul Buetow
2026-02-24tui: address review feedback for dashboard and exportPaul Buetow
2026-02-23task 302: add stats engine orchestration and snapshotsPaul Buetow
2026-02-23task 303: add per-process accumulator with pid-reuse guardPaul Buetow
2026-02-23task 303: add fixed-bucket log-scale histogramPaul Buetow
2026-02-23task 305: add top-N file ranker with bounded cardinalityPaul Buetow
2026-02-23task 305: add per-syscall accumulator with reservoir percentilesPaul Buetow
2026-02-23task 305: add ring time series with wrap-around and gap testsPaul Buetow
2026-02-23task 304: harden snapshot immutability after sub-agent reviewPaul Buetow
2026-02-23task 304: add immutable statsengine snapshot typesPaul Buetow