78 """Background monitoring loop"""
82 threads = self.
process.threads()
85 memory_mb = self.
process.memory_info().rss / 1024 / 1024
93 avg_calibration_ms = (
103 consensus_thread_cpu=0.0,
104 calibration_thread_cpu=0.0,
105 total_memory_mb=memory_mb,
106 consensus_time_ms=avg_consensus_ms,
107 calibration_time_ms=avg_calibration_ms,
108 consensus_queue_depth=0,
109 calibration_queue_depth=0,
118 except Exception
as e:
119 logger.error(f
"Performance monitoring error: {e}")