Show pipeline timing breakdown for non-picture source targets

Non-picture sources (static, gradient, color_cycle) returned empty
timing from get_last_timing(), causing timing_total_ms to be null and
hiding the entire timing section in the UI. Now timing_total_ms falls
back to send_ms when no CSS pipeline timing exists. Frontend timing
bar/legend segments are conditionally rendered to avoid null labels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-21 02:55:02 +03:00
parent 7c0c064453
commit 67d141b75b
2 changed files with 13 additions and 10 deletions

View File

@@ -245,10 +245,13 @@ class WledTargetProcessor(TargetProcessor):
extract_ms = round(css_timing.get("extract_ms", 0), 1) if css_timing else None
map_ms = round(css_timing.get("map_leds_ms", 0), 1) if css_timing else None
smooth_ms = round(css_timing.get("smooth_ms", 0), 1) if css_timing else None
total_ms = (
round(css_timing.get("total_ms", 0) + metrics.timing_send_ms, 1)
if css_timing else None
)
if css_timing:
total_ms = round(css_timing.get("total_ms", 0) + metrics.timing_send_ms, 1)
elif self._is_running and send_ms is not None:
# Non-picture sources have no CSS pipeline timing — total = send only
total_ms = send_ms
else:
total_ms = None
return {
"target_id": self._target_id,