(directory: Path, cluster: Cluster)
| 58 | |
| 59 | |
| 60 | def load_monitoring_data(directory: Path, cluster: Cluster) -> MonitoringData: |
| 61 | data = {} |
| 62 | |
| 63 | for node, process in cluster.processes(): |
| 64 | if "monitor" == process.key: |
| 65 | trace_file = node_monitoring_trace(directory, node.hostname) |
| 66 | if trace_file.exists(): |
| 67 | with open(trace_file) as f: |
| 68 | data[node] = MonitoringRecord.deserialize_records(f) |
| 69 | else: |
| 70 | logging.warning(f"Monitoring trace for {node.hostname} not found at {trace_file}") |
| 71 | return data |
no test coverage detected