sistemato il loging ed aggiunto il rate di ricezione dati da server e rate aggiornamento ppi display
This commit is contained in:
parent
e286edc182
commit
fc1722d8eb
@ -135,15 +135,15 @@ class SimulationStateHub:
|
|||||||
# monotonic time to avoid issues with system clock changes.
|
# 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:
|
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)
|
rate = self.get_real_rate(window_seconds=self._real_summary_interval_s)
|
||||||
try:
|
#try:
|
||||||
logger.info(
|
# logger.info(
|
||||||
"[SimulationStateHub] real states: recent_rate=%.1f ev/s total_targets=%d",
|
# "[SimulationStateHub] real states: recent_rate=%.1f ev/s total_targets=%d",
|
||||||
rate,
|
# rate,
|
||||||
len(self._target_data),
|
# len(self._target_data),
|
||||||
)
|
# )
|
||||||
except Exception:
|
#except Exception:
|
||||||
# never allow logging to raise
|
# # never allow logging to raise
|
||||||
pass
|
# pass
|
||||||
self._last_real_summary_time = now
|
self._last_real_summary_time = now
|
||||||
except Exception:
|
except Exception:
|
||||||
# Never allow diagnostic/logging instrumentation to break hub behavior
|
# Never allow diagnostic/logging instrumentation to break hub behavior
|
||||||
|
|||||||
@ -212,10 +212,10 @@ class PPIDisplay(ttk.Frame):
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
rate = cnt / float(self._update_summary_interval_s) if self._update_summary_interval_s > 0 else float(cnt)
|
rate = cnt / float(self._update_summary_interval_s) if self._update_summary_interval_s > 0 else float(cnt)
|
||||||
try:
|
#try:
|
||||||
logger.info("[PPIDisplay] update_real_targets: recent_rate=%.1f updates/s display_targets=%d", rate, len(targets))
|
# logger.info("[PPIDisplay] update_real_targets: recent_rate=%.1f updates/s display_targets=%d", rate, len(targets))
|
||||||
except Exception:
|
#except Exception:
|
||||||
pass
|
# pass
|
||||||
self._last_update_summary_time = now
|
self._last_update_summary_time = now
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user