mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
[CI] Keep Track of Workflow Name Instead of Job Name
The metrics script includes some logic to only read look at workflows up to the most recent workflow it has seen previously. This was broken in a previous patch when workflow metrics began to be emitted per job. The logic ending the metrics gathering would never trigger, so we would continually fetch more and more workflows until OOM.
This commit is contained in:
@@ -24,6 +24,7 @@ class JobMetrics:
|
||||
status: int
|
||||
created_at_ns: int
|
||||
workflow_id: int
|
||||
workflow_name: str
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -199,6 +200,7 @@ def get_per_workflow_metrics(
|
||||
job_result,
|
||||
created_at_ns,
|
||||
workflow_run.id,
|
||||
workflow_run.name,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -278,7 +280,7 @@ def main():
|
||||
for workflow_metric in reversed(current_metrics):
|
||||
if isinstance(workflow_metric, JobMetrics):
|
||||
workflows_to_track[
|
||||
workflow_metric.job_name
|
||||
workflow_metric.workflow_name
|
||||
] = workflow_metric.workflow_id
|
||||
|
||||
time.sleep(SCRAPE_INTERVAL_SECONDS)
|
||||
|
||||
Reference in New Issue
Block a user