I/O stats, history recording with Top Consumers view, find open file (#11, #9, #7)#41
Merged
Conversation
…, #9, #7) Issue #11 - I/O statistics: - ProcessInfo carries cumulative io_read_bytes/io_write_bytes (Linux: /proc/<pid>/io read_bytes/write_bytes; 0 = unavailable on other platforms) - DataStore computes io_read_rate/io_write_rate (bytes/sec) with the same PID-reuse guards as CPU deltas - GUI tree and list views gain sortable Read/s and Write/s columns Issue #9 - history (the project's original goal): - New HistoryStore core service: ring buffer (default 600 ticks) of system aggregates + compact per-process samples (cpu user/kernel split, memory, I/O rates), recorded from the collection thread - ProcessInfo gains cpu_user_percent/cpu_kernel_percent (DataStore computes) - Process popup charts are backfilled from history on open - the past is visible immediately instead of starting empty - File > Export History to CSV writes ~/pex-history-<ts>-{system,processes}.csv Issue #7 - find open file/handle (Process Explorer's "Find Handle"): - Find > Find Open File / Handle (Ctrl+Shift+F): background scan of every process's file descriptors and mapped libraries for a case-insensitive path substring; results table jumps to the owning process on click - Worker uses a dedicated provider instance (no sharing with the UI thread) and is joined before GLFW teardown TUI: unchanged in this pass (I/O columns and history wiring are GUI-only for now; pexc builds and runs unchanged). Verified on Debian (WSL): clean Release build, zero warnings; GUI runs at parity with main (158 vs 157 MB RSS); pexc smoke-tested (clean quit). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
, #7) - Process list gains Read/s and Write/s columns (horizontally scrollable row, compact format, "-" when idle) - 'd' dumps recorded history to ~/pex-history-<ts>-{system,processes}.csv; result shown as a transient status-bar message (pexc now wires a HistoryStore into DataStore like the GUI) - 'o' opens a find-open-file prompt: background worker scans every process's fds and mapped libraries for a path substring; results in a scrollable overlay (j/k navigate, Enter jumps to the process and expands its ancestors, Esc cancels/closes); worker uses a dedicated provider and is joined on shutdown; progress wakes the render loop via an atomic - Status bar hints and help overlay updated; help dialog height now adapts to small terminals instead of a fixed 31 rows Verified in WSL Debian: clean build; scripted pty session exercises 'd' (both CSVs written with correct headers/data) and 'o' (scan completes over all processes, overlay renders, clean quit). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Process popup charts now hold 600 points (the full recorded depth, ~10 min at 1 s refresh) instead of 60, so the backfill shows everything HistoryStore has - New View > "History - Top Consumers" window: pick a metric (CPU, Memory, I/O read, I/O write) and a window (1 min / 5 min / all recorded) and see the top 25 processes ranked by average consumption over that window, with per-process trend sparklines, avg/peak values, presence percentage, and click-to-jump to the live process (exited processes shown dimmed) - HistoryStore: new aggregate() (per-PID avg/peak over a window; averages divide by the window length, so a process alive half the window at 100% CPU averages 50% - the "who ate my CPU" semantics) and get_metric_series() (single-metric per-PID series for sparklines) - Aggregation cached in the view, recomputed on parameter change or 1 s Verified: clean Release build (zero warnings), pexc smoke test passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements three features in both the GUI (pex) and TUI (pexc):
Issue #11 — I/O statistics
ProcessInfocarries cumulativeio_read_bytes/io_write_bytes(Linux:/proc/<pid>/io); DataStore computes bytes/sec rates with the same PID-reuse guards as CPU deltas-there) — suggest keeping Add I/O stats #11 open retitled for that remainder, or closing itIssue #9 — history (the original project idea)
HistoryStorecore service: ring buffer (600 ticks ≈ 10 min at 1 s refresh) of system aggregates + per-process samples (CPU user/kernel split, memory, I/O rates), recorded from the collection threaddkey →~/pex-history-<ts>-{system,processes}.csvIssue #7 — find open file/handle
okey + results overlayVerification
-Wall -Wextra -Wpedantic)Closes #7
Closes #9
🤖 Generated with Claude Code