Skip to content

Overhaul TUI: Flex, charts, CPU Analyzer heatmap#47

Draft
emansom wants to merge 1 commit intolevel1techs:mainfrom
emansom:feature/flexbox
Draft

Overhaul TUI: Flex, charts, CPU Analyzer heatmap#47
emansom wants to merge 1 commit intolevel1techs:mainfrom
emansom:feature/flexbox

Conversation

@emansom
Copy link
Copy Markdown
Contributor

@emansom emansom commented Mar 29, 2026

Description

Rework dashboard to fill up the screen with as much stuff in a reasonable displayable format, leaving as little blank space possible.

In future PRs, some panels from the dashboard that aren't really what siomon was designed to show should be removed.
e.g. we should show front and center what siomon can specifically show what other tools cannot.

Screenshots

Screenshot_20260329_214621 Screenshot_20260329_214644

Summary

  • Flex layout: Fill(1) + Flex::SpaceBetween for equal-width columns.
    Fixed panels get exact sizing, growable chart panels absorb surplus.
  • CPU Analyzer: Histogram heatmap inspired by @HumbleUser33's CPU-Heatmap.
    Per-physical-core frequency + per-thread load rows with heat-colored bins.
    Groups by core (C0/Th1/Th2); multi-NUMA shows per-CCD rows.
    Always-visible Power, L3 HR, DRAM BW side columns (greyed N/A when unavailable).
  • Chart panels: Power, Storage, Network, Fans, CPU Freq, Voltage, GPU, Memory converted to Ratatui Chart with Braille markers. 12-color contrast palette.
  • New sensors: perf_cache (L3 hit rate via perf_event_open LLC counters) and resctrl (LLC occupancy + MBM via /sys/fs/resctrl/). Both degrade gracefully.
  • Sparklines: Left-padded; width from column width.
  • Config: chart_history_secs (default 10s).
  • Cleanup: Removed MultiCol, NetIfaceData, old heatmap infra. Thermal simplified to sparklines only.

Attribution

CPU Analyzer visualization inspired by
HumbleUser33/CPU-Heatmap
(tweet).

@emansom emansom force-pushed the feature/flexbox branch 9 times, most recently from 0496ab4 to 2e3e88a Compare March 29, 2026 18:32
@emansom
Copy link
Copy Markdown
Contributor Author

emansom commented Mar 29, 2026

Was browsing the web for CPU heatmap designs, came across this tweet from @HumbleUser33 and it looked very intriguing and exactly the kind of data visualization showing off the strengths of siomon.

Ported his code over and the result looks like this:

Screenshot_20260329_214715

@HumbleUser33 Would love your input on this project, and how to make dashboard data visualization more useful!

@emansom emansom force-pushed the feature/flexbox branch 2 times, most recently from 27d9467 to d05d438 Compare March 29, 2026 19:04
@emansom emansom changed the title Charts, heatmaps and CCD awareness (#36 feedback) Overhaul TUI: Flex, charts, CPU Analyzer heatmap Mar 29, 2026
Rework the TUI dashboard to maximize screen use and add
rich data visualizations. Replace static percentage layouts
with Ratatui Flex API, convert most panels to time-series
charts, and add a histogram-based CPU Analyzer panel
inspired by HumbleUser33's CPU-Heatmap project.

Layout engine:
- Fill(1) + Flex::SpaceBetween for equal-width columns
- Fixed panels: Length(h), growable: Fill(h), truncated:
  Fill(1) — no wasted vertical space
- Sparkline width derived from column width, not fixed
  breakpoints; left-padded to fill immediately

CPU Analyzer panel:
- Histogram heatmap: time-distribution of frequency and
  load per physical core, heat-colored bins over 10s
  history window (configurable via chart_history_secs)
- Groups logical CPUs by physical core via sysfs
  topology/core_id (C0 bold, Th1/Th2 grey)
- Multi-NUMA: per-CCD aggregated rows, "CCD Analyzer"
- Always-visible Power, L3 HR, DRAM BW side columns;
  greyed out with N/A when data unavailable
- Bottom-up vertical histogram bars with scale labels

Chart conversions:
- Power, Storage, Network, Fans, CPU Freq, Voltage,
  GPU, Memory → Ratatui Chart with Braille markers
- 12-color palette ordered for maximum contrast
- CPU Freq groups by NUMA node on multi-NUMA systems
- Memory tracks RAM/Swap utilization over time

New sensor sources:
- perf_cache: L3 hit rate via perf_event_open(2) LLC
  counters; degrades when perf_event_paranoid blocks
- resctrl: LLC occupancy + memory bandwidth via
  /sys/fs/resctrl/ (Intel RDT / AMD QoS)

NUMA topology:
- read_numa_nodes() for CCD awareness
- read_physical_core_map() for SMT grouping
- parse_cpulist() for "0-3,8-11" range strings

Cleanup:
- Removed MultiCol, NetIfaceData, HashMap import
- Removed HeatmapCell, HeatmapSection,
  HeatmapWithFallback, PanelContent::Heatmap
- Thermal panel: sparklines only, no fallback
- net_bar moved to #[cfg(test)]

Config:
- Added [dashboard] chart_history_secs (default 10)

Co-authored-by: HumbleUser33 <sadheal@live.com>
@emansom
Copy link
Copy Markdown
Contributor Author

emansom commented Apr 1, 2026

Claude Code limits hit, will try to setup local. Got a 16GB 9070 XT and 96GB of DDR5, had some success with OpenCode + Qwen2.5-Coder. Any recommendations? @eous

@HumbleUser33
Copy link
Copy Markdown

Looks great !
This chart is all about average measures, so, my suggestions:

  • Add an option to reset the averaging period to get a fresh view before starting a specific process
  • Add an option to set an averaging rolling cycle period "2 seconds" "10 seconds" etc. => to get a some kind of a "realtime averaged" view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants