Skip to main content

Module tui

Module tui 

Source
Expand description

The terminal UI.

Same four questions the browser UI asks, over the same three routes, in the place the person asking them already is. The browser UI wins on waterfalls and charts; this wins on being one kubectl exec away and on working with no server running at all — Source::Local reads a block directory in-process, so a detached volume is still readable after the pod that wrote it is gone.

Everything here is synchronous. There is no runtime, no task and no channel: the loop draws, blocks on a key, and runs one query. A query that takes two seconds freezes the UI for two seconds — which is why the frame is painted before the query runs, so the freeze always has a “running” on it rather than a stale screen.

Re-exports§

pub use source::Source;
pub use source::parse_addr;

Modules§

source 🔒
Where the TUI’s answers come from.

Structs§

App 🔒
FrameView 🔒
What /correlate came back with, flattened into the two lists it draws.
MapView 🔒
The service map as a call tree rather than a graph.
Trace 🔒

Enums§

Job 🔒
Mode 🔒
Part 🔒
One piece of a filter line: a key op value, or a word with no operator.
Pick 🔒
What Enter does to the selected line of the frame or map pane.
Tab 🔒

Constants§

ENTRY_KEY 🔒
How the map names the synthetic caller of every root span (mira_core::frame::ENTRY). A string where every other node key is a decimal entity key, so it cannot collide with one.
OPS 🔒
TAIL_MS 🔒
How long a follow tick waits for a key before giving up and re-querying.
WINDOWS 🔒
Selectable query windows, coarse on purpose: the point of [ and ] is to change the answer in one keystroke, and a continuous control would need two.

Functions§

alert_value 🔒
The right-hand side of an alert row: where the number sits against the line.
array 🔒
body_h 🔒
bytes 🔒
Binary units, because every other tool an operator has open uses them.
civil 🔒
clip 🔒
detail 🔒
The selected record, field by field, then its attributes.
dur 🔒
g 🔒
A number at human precision: metric values span counters in the millions and ratios below one, and neither reads well under the other’s format.
help 🔒
hms 🔒
Local wall-clock time of a nanosecond timestamp.
i64_of 🔒
A 64-bit integer out of a response, whichever way it was encoded.
kind 🔒
kv 🔒
One label value line of the diagnostics pane.
log_row 🔒
map_row 🔒
One service in the map: where it sits in the call tree, and what it did.
ms 🔒
nested 🔒
num 🔒
pairs 🔒
A mapping’s entries as (key, rendered value), in the order they arrived.
parse_filter 🔒
Split the filter line into query terms.
rule 🔒
run
scalar 🔒
Type a filter value the way its text reads.
service 🔒
service_term 🔒
The filter term that selects one service, for a name picked out of the frame or map pane.
sev_style 🔒
since 🔒
An age in seconds, at the precision someone reading it cares about.
span_bar 🔒
One span’s row: name, service, bar, duration, each clipped to its column.
span_row 🔒
spark 🔒
Eight levels of block, scaled between the run’s own min and max.
stamp 🔒
stats_line 🔒
tally 🔒
A record count. g is for metric values, where 5 means “about five” and a decimal is information; here it means five records and a decimal is noise.
text 🔒
One value on one line.
tokens 🔒
Whitespace-separated, except inside double quotes.
trace_query 🔒
window_start 🔒
First visible index of a list scrolled to keep sel on screen.