Commit Graph

2 Commits

Author SHA1 Message Date
nicolargo
35c4f20cfc fix(v5): percpu — column header names are plain text (no bold, no HEADER)
V4 parity: ``display_cpu_stats_per_line`` emits each column name via
``curse_add_line(msg)`` with no decoration. Only the leading ``CPU``
title cell carries HEADER + bold.

Regression test verifies that every column-header cell after the title
is ``ColorRole.DEFAULT`` and ``bold=False``.
2026-05-15 10:11:11 +02:00
nicolargo
81bb04bbd5 feat(v5): percpu render_curses_v5 — transposed grid (fields × cores)
Replicates v4 ``percpu.msg_curse()`` layout (Linux, quicklook disabled):

    CPU    total    user  system  iowait    idle     irq    nice   steal   guest
    CPU0   21.7%   12.5%    3.2%    0.5%   83.8%    0.0%    0.0%    0.0%    0.0%
    CPU1   11.9%    8.1%    2.0%    0.1%   89.8%    0.0%    0.0%    0.0%    0.0%
    CPU2   21.5%   15.0%    4.5%    1.2%   79.3%    0.0%    0.0%    0.0%    0.0%
    CPU3    8.1%    6.3%    1.8%    0.0%   91.9%    0.0%    0.0%    0.0%    0.0%
    CPU*   16.8%   11.2%    3.2%    0.5%   85.2%    0.0%    0.0%    0.0%    0.0%

- Fields are columns, CPU cores are rows (transposed vs the other plugins).
- OS-specific stat columns (Linux / macOS / BSD / Windows) via
  ``_os_headers()`` — mirrors v4 ``define_headers_from_os()``.
- ``CPU`` title + ``total`` column always present (G1 assumes quicklook
  disabled; TODO in module for the quicklook-enabled mode).
- ``max_cpu_display=4`` default; cores sorted by ``total`` desc, extras
  collapsed into a ``CPU*`` overflow row.
- ``CPU*`` row averages the displayed cores' stats (bug-for-bug parity
  with v4 ``summarize_all_cpus_not_displayed``).
- Per-cell coloring stays DEFAULT — v5 percpu carries no field-level
  alerts (per model_v5 docstring). The system-wide ``cpu`` plugin
  remains the source of CPU alerts.

17 new tests in tests/test_plugin_percpu_render_curses_v5.py.
2026-05-15 10:03:31 +02:00