1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/// Floor on the table's data rows in degenerate heights: the Running
/// box's rendered window shrinks before the table drops below this.
pub const MIN_TABLE_ROWS: u16 = 3;
/// Leaf index of the Running box; its `Placed` entry exists only while
/// anything runs.
pub const RUNNING_BOX: usize = 1;
/// Ceiling on the Running box: it grows upward to at most this percent of
/// the pane's inner height, so the table keeps the rest.
pub const RUNNING_CAP_PERCENT: u16 = 80;
/// Chrome rows the Running box reserves: the divider rule plus the column
/// header.
pub const RUNNING_CHROME: u16 = 2;
/// Header text for the Source column — also defines the column's
/// minimum width so the header never gets truncated.
pub const SOURCE_HEADER: &str = "Source";
/// Leaf index of the targets table box in the pane's tree.
pub const TABLE_BOX: usize = 0;
/// Chrome rows the table box reserves: the ratatui `Table` header row.
pub const TABLE_CHROME: u16 = 1;
/// Footer row the table box reserves while the Running box sits below:
/// blank when every table row is visible, the table's pager rule when it
/// scrolls.
pub const TABLE_FOOTER: u16 = 1;
/// Header text for Target columns; the main table adds its leading pad.
pub const TARGET_HEADER: &str = "Target";
/// Target rows render one leading space before the target name.
pub const TARGET_LEADING_PAD: usize = 1;
/// Inter-column gap used by the `ratatui` table.
pub const TARGET_TABLE_COLUMN_SPACING: u16 = 1;
/// Number of 1-column gaps between Target/Source/Kind.
pub const TARGET_TABLE_GAP_COUNT: usize = 2;
/// Width of the CPU column: `476%` — a busy multi-threaded process can
/// exceed 100.
pub const CPU_COL_WIDTH: usize = 4;
/// Width of the MEM column: `999.9 MiB`.
pub const MEM_COL_WIDTH: usize = 9;
/// Width consumed by one outline depth: two leading spaces.
pub const OUTLINE_DEPTH_INDENT_WIDTH: usize = 2;
/// Width consumed by an outline glyph plus its following gap.
pub const OUTLINE_PARENT_PREFIX_WIDTH: usize = 2;
/// Width consumed by a one-digit child-count suffix, such as ` (9)`.
pub const OUTLINE_SINGLE_DIGIT_SUFFIX_WIDTH: usize = 4;
/// Width of the PID column: Linux PIDs reach seven digits.
pub const PID_COL_WIDTH: usize = 7;
/// Width of the Profile column: the widest profile label (`release`).
pub const PROFILE_COL_WIDTH: usize = 7;
/// Cap on the Target column width so a single long target name can't
/// crowd out the metric columns. Overflow truncates with an ellipsis.
pub const TARGET_COL_MAX: usize = 24;