[llvm] [CI] Add queue size, running count metrics (PR #122714)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 02:16:46 PST 2025
================
@@ -129,10 +189,16 @@ def upload_metrics(workflow_metrics, metrics_userid, api_key):
"""
metrics_batch = []
for workflow_metric in workflow_metrics:
- workflow_formatted_name = workflow_metric.job_name.lower().replace(" ", "_")
- metrics_batch.append(
- f"{workflow_formatted_name} queue_time={workflow_metric.queue_time},run_time={workflow_metric.run_time},status={workflow_metric.status} {workflow_metric.created_at_ns}"
- )
+ if isinstance(workflow_metric, GaugeMetric):
+ name = workflow_metric.name.lower().replace(" ", "_")
+ metrics_batch.append(
+ f"{name} value={workflow_metric.value} {workflow_metric.time_ns}"
+ )
+ else:
----------------
Keenuts wrote:
Changed the else into en elif, and added a ValueError.
https://github.com/llvm/llvm-project/pull/122714
More information about the llvm-commits
mailing list