diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-23 20:16:15 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-23 20:16:15 +0300 |
| commit | f12756eecf2ea791ad894cc63380ed78f22f8797 (patch) | |
| tree | e506ace88b6db5ba7371d2b7f421fe480ddf45f0 /internal/statsengine/snapshot_test.go | |
| parent | 4e67c348ef1dc2c0d08f3e90c2affb555b205d0e (diff) | |
9c move Non-IO grouping policy from core stats/types into dashboard
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>
Diffstat (limited to 'internal/statsengine/snapshot_test.go')
| -rw-r--r-- | internal/statsengine/snapshot_test.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/internal/statsengine/snapshot_test.go b/internal/statsengine/snapshot_test.go index 9b54409..d5cb7aa 100644 --- a/internal/statsengine/snapshot_test.go +++ b/internal/statsengine/snapshot_test.go @@ -124,35 +124,6 @@ func TestNilAccessorsRemainNil(t *testing.T) { } } -func TestSnapshotNonIOFamilies(t *testing.T) { - s := NewSnapshotWithFamilies( - nil, - nil, - nil, - nil, - []FamilySnapshot{ - {Family: types.FamilyFS, Name: "FS"}, - {Family: types.FamilyPolling, Name: "Polling"}, - {Family: types.FamilyProcess, Name: "Process"}, - }, - nil, - nil, - HistogramSnapshot{}, - HistogramSnapshot{}, - ) - - rows := s.NonIOFamilies() - if len(rows) != 2 { - t.Fatalf("NonIOFamilies len = %d, want 2", len(rows)) - } - if rows[0].Family == types.FamilyFS || rows[1].Family == types.FamilyFS { - t.Fatalf("NonIOFamilies included FS: %+v", rows) - } - if got := s.NonIOFamiliesCount(); got != 2 { - t.Fatalf("NonIOFamiliesCount = %d, want 2", got) - } -} - func TestTopNAccessors(t *testing.T) { s := NewSnapshot( nil, |
