Context
Two TelemetryStore methods acquire the RwLock more often than necessary:
all_model_performances() acquires N+2 read locks for M models (inconsistent snapshot possible)
record_telemetry() acquires write lock once per event instead of batching
Proposed fix
- Single read lock pass in
all_model_performances()
- New
record_batch() method with single write lock
Refs #537 (Gitea), Refs #523
Context
Two TelemetryStore methods acquire the RwLock more often than necessary:
all_model_performances()acquires N+2 read locks for M models (inconsistent snapshot possible)record_telemetry()acquires write lock once per event instead of batchingProposed fix
all_model_performances()record_batch()method with single write lockRefs #537 (Gitea), Refs #523