diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-24 12:16:28 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-24 12:16:28 +0200 |
| commit | 76468727f1ef06caefd8fc8c48cf1a12aa414035 (patch) | |
| tree | c49c4a0787f5ff834d6668da3b3916c0f083b501 /internal | |
| parent | 7c5f331dd14e728979530abb589f5b3cbd6c971e (diff) | |
tui: drop redundant syscall table sort
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/tui/dashboard/syscalls.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/internal/tui/dashboard/syscalls.go b/internal/tui/dashboard/syscalls.go index e40c2e7..bdaa3a0 100644 --- a/internal/tui/dashboard/syscalls.go +++ b/internal/tui/dashboard/syscalls.go @@ -3,7 +3,6 @@ package dashboard import ( "fmt" "ior/internal/statsengine" - "sort" "strconv" "time" @@ -51,16 +50,8 @@ func renderSyscallsWithOffset(snap *statsengine.Snapshot, width, height, offset } func syscallRows(syscalls []statsengine.SyscallSnapshot) []table.Row { - ordered := append([]statsengine.SyscallSnapshot(nil), syscalls...) - sort.SliceStable(ordered, func(i, j int) bool { - if ordered[i].Count == ordered[j].Count { - return ordered[i].Name < ordered[j].Name - } - return ordered[i].Count > ordered[j].Count - }) - - rows := make([]table.Row, 0, len(ordered)) - for _, s := range ordered { + rows := make([]table.Row, 0, len(syscalls)) + for _, s := range syscalls { rows = append(rows, table.Row{ s.Name, strconv.FormatUint(s.Count, 10), |
