fhelium.benchmarks.tui
Textual benchmark and profile selector.
BenchmarkApp
class View source
python
BenchmarkApp(registry: BenchmarkRegistry)1
Bases: App[tuple[str, str] | None]
Select a benchmark/profile; run it only after the TUI has exited.
Attributes
| Name | Type | Default/value |
|---|---|---|
TITLE | 'FHElium Benchmarks' | |
BINDINGS | [('r', 'run_benchmark', 'Run'), ('q', 'quit', 'Quit')] | |
CSS | '\n Screen {\n background: #07111f;\n color: #d7e2f0;\n }\n\n #app-shell {\n width: 100%;\n height: 100%;\n padding: 1 2;\n }\n\n #brand-bar {\n layout: horizontal;\n width: 100%;\n height: 3;\n padding: 0 2;\n margin-bottom: 1;\n background: #0b1a2d;\n border: round #223a59;\n }\n\n #brand-title {\n width: 1fr;\n height: 1;\n color: #eaf4ff;\n text-style: bold;\n content-align-vertical: middle;\n }\n\n #brand-subtitle {\n width: auto;\n height: 1;\n color: #7f9bbd;\n text-align: right;\n content-align-vertical: middle;\n }\n\n #selector-area {\n layout: horizontal;\n width: 100%;\n height: 1fr;\n }\n\n .selector-pane {\n layout: vertical;\n height: 100%;\n padding: 1;\n background: #0a1728;\n border: round #22344d;\n }\n\n #benchmark-pane {\n width: 3fr;\n margin-right: 1;\n }\n\n #profile-pane {\n width: 2fr;\n }\n\n .selector-pane.active {\n background: #0d1d31;\n border: heavy #36c5f0;\n }\n\n .pane-eyebrow {\n height: 1;\n color: #36c5f0;\n text-style: bold;\n }\n\n .pane-title {\n height: 2;\n color: #eef7ff;\n text-style: bold;\n content-align-vertical: middle;\n }\n\n ListView {\n height: 1fr;\n margin-top: 1;\n padding: 0 1;\n background: #071321;\n border: none;\n }\n\n ListView:focus {\n background: #0a192a;\n }\n\n ListItem {\n height: 3;\n padding: 1;\n color: #9fb2ca;\n }\n\n ListItem.--highlight {\n background: #12304a;\n color: #ffffff;\n text-style: bold;\n }\n\n .description-card {\n height: 10;\n margin-top: 1;\n padding: 1 2;\n background: #081422;\n border-top: solid #223a59;\n color: #a9bdd5;\n overflow-y: auto;\n }\n\n #profile-description {\n height: 14;\n }\n\n #selection-bar {\n width: 100%;\n height: 3;\n margin-top: 1;\n padding: 0 2;\n background: #0b1a2d;\n border: round #223a59;\n color: #8ea9c7;\n content-align-vertical: middle;\n }\n\n #shortcut-bar {\n width: 100%;\n height: 3;\n margin-top: 1;\n padding: 1 2;\n background: #071321;\n color: #708baa;\n content-align-horizontal: center;\n }\n ' |
compose
method
python
def compose() -> ComposeResult: ...1
on_mount
method
python
async def on_mount() -> None: ...1
on_list_view_highlighted
method
python
async def on_list_view_highlighted(event: ListView.Highlighted) -> None: ...1
on_list_view_selected
method
python
async def on_list_view_selected(event: ListView.Selected) -> None: ...1
on_key
method
python
def on_key(event: Key) -> None: ...1
action_run_benchmark
method
python
def action_run_benchmark() -> None: ...1
run_tui
function View source
python
def run_tui(registry: BenchmarkRegistry) -> None: ...1
Select in Textual, then run and render in the restored terminal.