@@ -341,6 +341,7 @@ def transform(
341341 benchmark_results : List ,
342342 benchmark_config : Dict [str , str ],
343343 job_name : str ,
344+ job_report : Any = {},
344345) -> List :
345346 """
346347 Transform the benchmark results into the format writable into the benchmark database
@@ -361,6 +362,7 @@ def transform(
361362 # Just keep a copy of the benchmark config here
362363 "benchmark_config" : json .dumps (benchmark_config ),
363364 "job_conclusion" : "SUCCESS" ,
365+ "job_arn" : job_report .get ("arn" , "" ),
364366 },
365367 },
366368 "model" : {
@@ -446,6 +448,7 @@ def transform_failure_record(
446448 "app_type" : app_type ,
447449 "job_conclusion" : result ,
448450 "failure_type" : level ,
451+ "job_arn" : report .get ("arn" , "" ),
449452 "job_report" : json .dumps (report ),
450453 },
451454 },
@@ -512,6 +515,7 @@ def get_benchmark_config(
512515def extract_benchmark_result_from_artifact (
513516 artifact : Dict [str , Any ],
514517 benchmark_config : Dict [str , str ],
518+ job_report : Any ,
515519) -> List [Any ]:
516520 job_name = artifact .get ("job_name" , "" )
517521 artifact_type = artifact .get ("type" , "" )
@@ -532,7 +536,9 @@ def extract_benchmark_result_from_artifact(
532536 )
533537 if not benchmark_results :
534538 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+ )
536542
537543
538544def get_app_type (type : str ):
@@ -674,7 +680,7 @@ def process_benchmark_results(content: Any, app: str, benchmark_configs: str):
674680 for job_artifact in job_artifacts :
675681 # generate result for each schema
676682 results = extract_benchmark_result_from_artifact (
677- job_artifact , benchmark_config
683+ job_artifact , benchmark_config , job_report
678684 )
679685 all_benchmark_results .extend (results )
680686 return all_benchmark_results
0 commit comments