sistemato il loging ed aggiunto il rate di ricezione dati da server e rate aggiornamento ppi display

This commit is contained in:
VALLONGOL 2025-10-29 10:01:36 +01:00
parent e286edc182
commit fc1722d8eb
2 changed files with 13 additions and 13 deletions

View File

@ -135,15 +135,15 @@ class SimulationStateHub:
# monotonic time to avoid issues with system clock changes.
if now is not None and (now - self._last_real_summary_time) >= self._real_summary_interval_s:
rate = self.get_real_rate(window_seconds=self._real_summary_interval_s)
try:
logger.info(
"[SimulationStateHub] real states: recent_rate=%.1f ev/s total_targets=%d",
rate,
len(self._target_data),
)
except Exception:
# never allow logging to raise
pass
#try:
# logger.info(
# "[SimulationStateHub] real states: recent_rate=%.1f ev/s total_targets=%d",
# rate,
# len(self._target_data),
# )
#except Exception:
# # never allow logging to raise
# pass
self._last_real_summary_time = now
except Exception:
# Never allow diagnostic/logging instrumentation to break hub behavior

View File

@ -212,10 +212,10 @@ class PPIDisplay(ttk.Frame):
else:
break
rate = cnt / float(self._update_summary_interval_s) if self._update_summary_interval_s > 0 else float(cnt)
try:
logger.info("[PPIDisplay] update_real_targets: recent_rate=%.1f updates/s display_targets=%d", rate, len(targets))
except Exception:
pass
#try:
# logger.info("[PPIDisplay] update_real_targets: recent_rate=%.1f updates/s display_targets=%d", rate, len(targets))
#except Exception:
# pass
self._last_update_summary_time = now
except Exception:
pass