@@ -341,6 +341,7 @@ def transform(
341
341
benchmark_results : List ,
342
342
benchmark_config : Dict [str , str ],
343
343
job_name : str ,
344
+ job_report : Any = {},
344
345
) -> List :
345
346
"""
346
347
Transform the benchmark results into the format writable into the benchmark database
@@ -361,6 +362,7 @@ def transform(
361
362
# Just keep a copy of the benchmark config here
362
363
"benchmark_config" : json .dumps (benchmark_config ),
363
364
"job_conclusion" : "SUCCESS" ,
365
+ "job_arn" : job_report .get ("arn" , "" ),
364
366
},
365
367
},
366
368
"model" : {
@@ -446,6 +448,7 @@ def transform_failure_record(
446
448
"app_type" : app_type ,
447
449
"job_conclusion" : result ,
448
450
"failure_type" : level ,
451
+ "job_arn" : report .get ("arn" , "" ),
449
452
"job_report" : json .dumps (report ),
450
453
},
451
454
},
@@ -512,6 +515,7 @@ def get_benchmark_config(
512
515
def extract_benchmark_result_from_artifact (
513
516
artifact : Dict [str , Any ],
514
517
benchmark_config : Dict [str , str ],
518
+ job_report : Any ,
515
519
) -> List [Any ]:
516
520
job_name = artifact .get ("job_name" , "" )
517
521
artifact_type = artifact .get ("type" , "" )
@@ -532,7 +536,9 @@ def extract_benchmark_result_from_artifact(
532
536
)
533
537
if not benchmark_results :
534
538
return []
535
- return transform (app_type , benchmark_results , benchmark_config , job_name )
539
+ return transform (
540
+ app_type , benchmark_results , benchmark_config , job_name , job_report
541
+ )
536
542
537
543
538
544
def get_app_type (type : str ):
@@ -674,7 +680,7 @@ def process_benchmark_results(content: Any, app: str, benchmark_configs: str):
674
680
for job_artifact in job_artifacts :
675
681
# generate result for each schema
676
682
results = extract_benchmark_result_from_artifact (
677
- job_artifact , benchmark_config
683
+ job_artifact , benchmark_config , job_report
678
684
)
679
685
all_benchmark_results .extend (results )
680
686
return all_benchmark_results
0 commit comments