v0.14.7 - Enhanced Statistics Panel in monitor.py (2026-03-03)¶
What Changed?¶
This release improves the real-time TUI monitor's Statistics panel with richer information. The panel now shows elapsed time, per-hit-type event rates in Hz, and initializes all hit type rows to zero at startup so users can see the full breakdown immediately without waiting for every hit type to appear.
What's New¶
Main Feature: Enhanced Statistics Panel¶
What it does:
The Statistics panel in monitor.py now displays:
- Elapsed Time: Duration from the first to the latest received event, derived from
uptime_ms - Event rate (Hz): Total event rate and per-hit-type rates, calculated from elapsed time
- All hit types at startup: All 7 hit type rows (
T,M,TM,B,TB,MB,TMB) are shown initialized to 0 immediately, rather than appearing only when events of that type arrive
How to use it:
# Stream events from the detector
uv run kazunoko read 1000 | uv run monitor.py
# Or watch a directory
uv run monitor.py --watch /path/to/data/directory
The Statistics panel will display:
┌─ Statistics ────────────────────────────────────────┐
│ Current File: events_run1.jsonl │
│ Elapsed Time: 123.4 s │
│ Total Events: 142 (1.151 Hz) │
│ Hit Types: │
│ 1 (T ): 52 (0.422 Hz) │
│ 2 ( M ): 38 (0.308 Hz) │
│ 3 (TM ): 21 (0.170 Hz) │
│ 4 ( B): 19 (0.154 Hz) │
│ 5 (T B): 8 (0.065 Hz) │
│ 6 ( MB): 4 (0.032 Hz) │
│ 7 (TMB): 0 │
└─────────────────────────────────────────────────────┘
Note: The r key resets all statistics including elapsed time tracking.
Installation¶
Quick Start¶
# Get the release
git checkout v0.14.7
# Setup
uv sync
# Run the monitor
uv run kazunoko generate random --count 1000 | uv run examples/monitor.py
What's Different from the Last Version?¶
✅ Added¶
Elapsed Timerow in the Statistics panel, derived fromuptime_msof first and last events- Per-hit-type event rate (Hz) alongside event counts
- Total event rate (Hz) on the
Total Eventsrow - All 7 hit type rows initialized to 0 at startup and after reset
🔧 Changed¶
- Statistics panel height increased from 13 to 15 lines to accommodate new rows
StatisticsPanelnow uses a singlestats: reactive[dict]instead of multiple reactive variables for reliable re-rendering
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- No changes to the library API, CLI commands, or data formats
- Only
examples/monitor.pywas modified - Existing scripts and workflows are unaffected
Tests Passed¶
- ✅ Builds without errors
- ✅ Statistics panel renders all 7 hit type rows from startup
- ✅ Elapsed time and Hz rates update correctly as events arrive
- ✅ Reset (
r) clears elapsed time and restores all counts to 0
Release Details¶
- Date: 2026-03-03
- Version: v0.14.7
- Files Changed: 1 (
examples/monitor.py) - Commits:
f0a98ea,ad207b2
Next Steps¶
- Further TUI improvements for the monitor (e.g., per-hit-type rate charts)
- Consider adding a time-windowed moving average rate display