Index
tui
¶
TUI package — Textual-based terminal UI for mzt top.
Classes¶
MonitorApp
¶
Bases: App[None]
Real-time Marianne system monitor TUI.
Reads data from MonitorReader and renders a job-centric layout
with live-updating metrics, event timeline, and drill-down detail.
Source code in src/marianne/tui/app.py
Functions¶
compose
¶
Build the widget tree.
Source code in src/marianne/tui/app.py
on_mount
async
¶
Start the event stream listener on mount.
Source code in src/marianne/tui/app.py
on_unmount
async
¶
refresh_data
async
¶
Fetch latest data from the reader and update all panels.
Source code in src/marianne/tui/app.py
action_navigate_down
¶
action_navigate_up
¶
action_drill_down
¶
action_cycle_sort
¶
Cycle sort order: ID -> CPU -> MEM.
Source code in src/marianne/tui/app.py
action_filter_job
¶
Toggle filter input.
Source code in src/marianne/tui/app.py
action_cancel_job
¶
Cancel the selected job.
Source code in src/marianne/tui/app.py
MonitorReader
¶
Reads profiler data for display in the TUI.
Supports three data sources, tried in priority order:
- IPC — queries the running daemon via
DaemonClient - SQLite — reads directly from
MonitorStorage - JSONL — tails the NDJSON streaming log
Parameters¶
storage:
Optional MonitorStorage instance for SQLite reads.
jsonl_path:
Path to the JSONL streaming file.
ipc_client:
Optional DaemonClient for live daemon queries.
Source code in src/marianne/tui/reader.py
Attributes¶
Functions¶
get_latest_snapshot
async
¶
Get the most recent system snapshot.
Returns None if no data is available from any source.
Source code in src/marianne/tui/reader.py
get_snapshots
async
¶
Get snapshots since the given unix timestamp.
Source code in src/marianne/tui/reader.py
get_events
async
¶
Get process lifecycle events since the given unix timestamp.
Source code in src/marianne/tui/reader.py
get_observer_events
async
¶
Get recent observer events via IPC.
Returns observer events (file and process activity) from the ObserverRecorder's in-memory ring buffer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str | None
|
Specific job ID, or None for all jobs. |
None
|
limit
|
int
|
Maximum number of events to return. |
50
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
List of observer event dicts, newest first. Empty if no |
list[dict[str, Any]]
|
IPC client or on error. |
Source code in src/marianne/tui/reader.py
stream_events
async
¶
Yield EventBus events as they arrive from the daemon via IPC.
Source code in src/marianne/tui/reader.py
stream_snapshots
async
¶
Yield snapshots as they become available.
For JSONL: tails the file, parsing new lines as they appear. For IPC: polls the daemon at a regular interval. For SQLite: polls the database at a regular interval.