rivosinc / prometheus-slurm-exporter

Export select slurm metrics to prometheus
Apache License 2.0
26 stars 5 forks source link

[node] add sinfo cli fallback #11

Closed abhinavDhulipala closed 9 months ago

abhinavDhulipala commented 9 months ago

sinfo schema randomly changed from openapi to a dataparser schema. Defeats the whole purpose to a large extent. Thus we are just going back to parsing the cli, node wise. This cli parsing could be optimized by collapsing the node name representation to a single line. Instead they are duplicated per line for ease of maintenance. Still takes on average less than a 100ms so we decided to go for maintainability over performance here. Putting this note here in case performance becomes a problem. We can optimize this.