| 40 | |
| 41 | |
| 42 | def load_profiling_data(cluster: Cluster) -> ProfilingData: |
| 43 | data = {} |
| 44 | |
| 45 | for _, process in cluster.processes(): |
| 46 | if PROFILER_METADATA_KEY in process.metadata: |
| 47 | records = process.metadata[PROFILER_METADATA_KEY] |
| 48 | process_records = {} |
| 49 | |
| 50 | for tag, file in records.items(): |
| 51 | file = Path(file) |
| 52 | if file.is_file(): |
| 53 | process_records[tag] = file |
| 54 | else: |
| 55 | logging.warning(f"Profiler record `{tag}` for `{process.key}` not found at {file}") |
| 56 | data[process.key] = process_records |
| 57 | return data |
| 58 | |
| 59 | |
| 60 | def load_monitoring_data(directory: Path, cluster: Cluster) -> MonitoringData: |