STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
calibration_performance_monitor.PerformanceMonitor Class Reference

Public Member Functions

 __init__ (self)
 start (self)
 stop (self)
 record_consensus_time (self, float time_ms)
 record_calibration_time (self, float time_ms)
Dict get_summary (self)
 print_summary (self)

Public Attributes

list metrics_history = []
list consensus_times = []
list calibration_times = []
 process = psutil.Process()

Protected Member Functions

 _monitor_loop (self)

Protected Attributes

bool _running = False
 _thread = None

Detailed Description

Definition at line 40 of file calibration_performance_monitor.py.

Constructor & Destructor Documentation

◆ __init__()

calibration_performance_monitor.PerformanceMonitor.__init__ ( self)

Definition at line 41 of file calibration_performance_monitor.py.

Member Function Documentation

◆ _monitor_loop()

calibration_performance_monitor.PerformanceMonitor._monitor_loop ( self)
protected
Background monitoring loop

Definition at line 77 of file calibration_performance_monitor.py.

References _running, calibration_times, consensus_times, metrics_history, process, and time.time().

Referenced by start().

◆ get_summary()

Dict calibration_performance_monitor.PerformanceMonitor.get_summary ( self)
Get performance summary

Definition at line 121 of file calibration_performance_monitor.py.

References max, and metrics_history.

Referenced by print_summary().

◆ print_summary()

calibration_performance_monitor.PerformanceMonitor.print_summary ( self)
Print performance summary to console

Definition at line 139 of file calibration_performance_monitor.py.

References get_summary().

◆ record_calibration_time()

calibration_performance_monitor.PerformanceMonitor.record_calibration_time ( self,
float time_ms )
Record time taken for calibration update

Definition at line 71 of file calibration_performance_monitor.py.

References calibration_times.

◆ record_consensus_time()

calibration_performance_monitor.PerformanceMonitor.record_consensus_time ( self,
float time_ms )
Record time taken for consensus computation

Definition at line 65 of file calibration_performance_monitor.py.

References consensus_times.

◆ start()

calibration_performance_monitor.PerformanceMonitor.start ( self)
Start monitoring in background thread

Definition at line 51 of file calibration_performance_monitor.py.

References _monitor_loop(), _running, _thread, and start().

Referenced by start().

◆ stop()

calibration_performance_monitor.PerformanceMonitor.stop ( self)
Stop monitoring

Definition at line 58 of file calibration_performance_monitor.py.

References _running, and _thread.

Member Data Documentation

◆ _running

bool calibration_performance_monitor.PerformanceMonitor._running = False
protected

Definition at line 45 of file calibration_performance_monitor.py.

Referenced by _monitor_loop(), start(), and stop().

◆ _thread

calibration_performance_monitor.PerformanceMonitor._thread = None
protected

Definition at line 46 of file calibration_performance_monitor.py.

Referenced by start(), and stop().

◆ calibration_times

calibration_performance_monitor.PerformanceMonitor.calibration_times = []

Definition at line 44 of file calibration_performance_monitor.py.

Referenced by _monitor_loop(), and record_calibration_time().

◆ consensus_times

calibration_performance_monitor.PerformanceMonitor.consensus_times = []

Definition at line 43 of file calibration_performance_monitor.py.

Referenced by _monitor_loop(), and record_consensus_time().

◆ metrics_history

◆ process

calibration_performance_monitor.PerformanceMonitor.process = psutil.Process()

Definition at line 49 of file calibration_performance_monitor.py.

Referenced by _monitor_loop().


The documentation for this class was generated from the following file: