Skip to content

Commit 33c064b

Browse files
authored
Summary page (#59)
* overview page added * live histograms added * updated the instructions * show version and latest release url * add more info * added a new gif
1 parent 6a699f7 commit 33c064b

7 files changed

Lines changed: 929 additions & 21 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ per-process I/O statistics, ELF metadata, and thread information.
2424

2525
- One-shot mode for a specific PID
2626
- Live mode dashboard with section filtering and refresh loop
27+
- Default live section is `Overview` (`5`) with 32-sample trend lanes
28+
(CPU, RSS, RX/s, TX/s, WR/s)
2729
- Uses procfs endpoints provided by the kernel module
2830

2931
### Tests

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
- **CPU Usage Tracking**: Real-time CPU percentage calculation per process and thread
4141
- **ELF Section Analysis**: Binary base address and section boundaries
4242
- **Proc Interface**: Easy access through `/proc/proclens_module/`
43-
- **Live Dashboard Mode**: No-arg mode refreshes every 1s with switchable Memory, Network, Threads, and I/O sections
43+
- **Live Dashboard Mode**: No-arg mode refreshes every 1s with a condensed Overview page, recent trend plots, and switchable Memory, Network, Threads, and I/O sections
4444
- **Comprehensive Testing**: Unit tests and QEMU-based E2E testing
4545
- **Code Quality**: Pre-configured static analysis (sparse, cppcheck, checkpatch)
4646

@@ -72,9 +72,10 @@
7272
Running without arguments starts a live dashboard:
7373

7474
- Auto-refreshes every 1 second
75-
- Defaults to section `1` (memory-related output)
76-
- Shows quick controls at the top: `1` memory, `2` network, `3` threads, `4` I/O
77-
- Shows command hints in-app: `1/2/3/4` switch sections, `0` changes PID
75+
- Defaults to section `5` (overview summary)
76+
- Overview includes 32-sample block-style histogram trend lanes for CPU, RSS, RX/s, TX/s, and WR/s based on recent snapshots
77+
- Shows quick controls at the top: `1` memory, `2` network, `3` threads, `4` I/O, `5` overview
78+
- Shows command hints in-app: `1/2/3/4/5` switch sections, `0` changes PID
7879
- Prints timestamps at top and bottom in `YY/MM/DD HH:MM:SS`
7980
- Keeps a snapshot history (up to 120 entries) for in-app navigation
8081
- Press Up/`k` for older snapshots, Down/`j` for newer snapshots, `f` to resume live follow

docs/TECHNICAL.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,31 @@ Simple C program that supports two modes:
121121
Prompts for a PID, then enters a 1-second refresh loop with section filtering.
122122
Each refresh prints start/end timestamps in `YY/MM/DD HH:MM:SS`.
123123
Snapshots are kept in an in-memory ring buffer (120 entries) for history browsing.
124+
Default section is `5` (Overview).
125+
126+
Overview mode includes trend lanes rendered from recent snapshot history:
127+
- CPU%
128+
- RSS
129+
- RX/s
130+
- TX/s
131+
- WR/s
132+
133+
Each lane uses 32 samples and block-style histogram glyphs, with one blank line
134+
between lanes for readability.
124135

125136
Controls shown in the header:
126-
- `1` - Memory section (default)
137+
- `1` - Memory section
127138
- `2` - Network section
128139
- `3` - Thread section
129140
- `4` - I/O section
141+
- `5` - Overview section (default)
130142
- `0` - Prompt for a new PID (switch process)
131143
- `Up` or `k` - Older snapshot
132144
- `Down` or `j` - Newer snapshot
133145
- `f` - Return to live-follow mode
134146

135-
Keys `1`, `2`, `3`, `4` switch sections instantly (no Enter required). Pressing `0` temporarily
136-
restores cooked terminal mode so the user can type a PID, then returns to raw mode.
147+
Keys `1`, `2`, `3`, `4`, `5` switch sections instantly (no Enter required). Pressing `0`
148+
temporarily restores cooked terminal mode so the user can type a PID, then returns to raw mode.
137149

138150
### I/O Stats
139151

docs/TESTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,16 @@ Expected behavior:
181181
- If `proclens_module` is not loaded, program exits immediately with status `-1`
182182
- If required proc files are missing (`pid`, `det`, `threads`), program exits immediately with status `-1`
183183
- Screen refreshes every 1 second
184-
- Header shows controls (`1` memory, `2` network, `3` threads, `4` I/O, `0` switch PID)
184+
- Header shows controls (`1` memory, `2` network, `3` threads, `4` I/O, `5` overview, `0` switch PID)
185185
- Each refresh shows `Snapshot start` and `Snapshot end` timestamps in `YY/MM/DD HH:MM:SS`
186+
- Overview page shows 32-sample block-style histogram trend lanes for CPU, RSS, RX/s, TX/s, and WR/s once enough samples are collected
187+
- Trend lanes are separated by one blank line (for example between RX/s and TX/s)
186188
- `Up`/`k` moves to older snapshots, `Down`/`j` moves toward newer snapshots
187189
- While browsing old snapshots, header indicates history-browsing mode
188190
- Press `f` to return to live-follow mode
189-
- Default section is memory (`1`)
191+
- Default section is overview (`5`)
190192
- Press `4` to view only I/O statistics (`[io]` section)
193+
- Press `5` to return to the condensed overview page
191194
- Pressing `0` prompts for a new PID and continues live refresh for that PID
192195

193196
Note: Live mode requires a real TTY for raw terminal input (`tcgetattr`/`tcsetattr`).

docs/demo.gif

-1.08 MB
Loading

0 commit comments

Comments
 (0)