Add a lightweight, self-contained phase tracer for measuring end-to-end bbctrl restart and Pi boot time. Disabled by setting BBCTRL_TRACE=0. - src/py/bbctrl/Trace.py: monotonic-anchored event log + sd_notify helper. - bbctrl/__init__.py: marks for imports, args parsed, ioloop, web init, listen, and an sd_notify READY=1 once HTTP is bound. - bbctrl/Ctrl.py: spans around each subsystem (avr, i2c, lcd, mach, preplanner, jog, pwr, hooks, aux, mach.connect). - bbctrl/Comm.py: avr.firmware_rebooted mark. - bbctrl/Web.py: TimingHandler (GET /api/diag/timing) and UITimingHandler (PUT /api/diag/timing/ui), plus a ws.first_open mark. - src/js/restart-timing.js + app.js: UI-side performance.now() marks (script.load, ws.open, ws.first_msg, ui.first_state, window.load), posted once to the controller. - scripts/bbctrl.service: stdout/stderr -> journal so TRACE lines are visible via journalctl -u bbctrl. (Was StandardOutput=null.) Revert: git revert this commit. To disable at runtime without reverting, set BBCTRL_TRACE=0 in the bbctrl service environment.
20 lines
504 B
Desktop File
20 lines
504 B
Desktop File
[Unit]
|
|
Description=Buildbotics Controller
|
|
After=network.target
|
|
|
|
[Service]
|
|
User=root
|
|
ExecStart=/usr/local/bin/bbctrl -l /var/log/bbctrl.log
|
|
WorkingDirectory=/var/lib/bbctrl
|
|
Restart=always
|
|
# StandardOutput was 'null'. Set to 'journal' so TRACE lines emitted by
|
|
# bbctrl.Trace are visible via `journalctl -u bbctrl`. Bbctrl still
|
|
# writes its own log via -l above; this only affects stdout/stderr.
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
Nice=-10
|
|
KillMode=process
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|