Skip to content

enh: show the system-wide CPU and RAM usage in the status bar (#1) - #24

Merged
paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:show-cpu-ram
Nov 26, 2026
Merged

paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:show-cpu-ram

Conversation

@paulmueller-agent

Copy link
Copy Markdown

Closes #1.

Changes

  • New chipstream/gui/sys_usage.py with SystemUsageLabel, a QLabel that shows the system-wide CPU and RAM usage, e.g. CPU 37% RAM 6.1 / 15.6 GiB (39%) (RAM in use = total − available). It updates itself every 2 s with psutil (already a dependency) via a QTimer.
  • The main window adds it as a permanent widget to the right of the status bar.

I chose system-wide values: they show whether the machine is saturated. Per-process values for ChipStream's worker processes would be misleading, because dcnum's shared-memory chunk arrays are counted in the memory of every worker process that uses them.

Tests

test_gui_sys_usage: the label is in the status bar, its timer is running, and the text matches the expected format after an update. It fails on main and passes with the change. test_gui_basic and test_gui_segm_torch_model_remove pass (offscreen).

Lint

lint-compare against main: ruff 0 → 0, pyright 1.1.408 0 → 0, flake8 clean.

🤖 Generated with Claude Code

…lysis#1)

A permanent status bar label (`SystemUsageLabel`) shows e.g.
"CPU 37%   RAM 6.1 / 15.6 GiB (39%)", updated every 2 s with psutil
(already a dependency). The values are system-wide; per-process memory
of ChipStream's worker processes is not shown, because dcnum's shared
memory arrays would be counted once per process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.72%. Comparing base (e78c84e) to head (cbda42d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   78.41%   78.72%   +0.30%     
==========================================
  Files          20       21       +1     
  Lines        1464     1485      +21     
==========================================
+ Hits         1148     1169      +21     
  Misses        316      316              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmueller
paulmueller merged commit 5045ff0 into DC-analysis:main Nov 26, 2026
8 checks passed
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.

Show CPU and RAM usage in the GUI

2 participants