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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user