File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ def extract_metrics(
315315
316316 failed = False
317317 total = timedelta ()
318+ elapsed_seconds = {}
318319 for key in metrics_dict :
319320 if key .endswith ("__runtime__total" ):
320321 # Big try block because Hour and microsecond is optional
@@ -341,10 +342,17 @@ def extract_metrics(
341342 )
342343 total += delta
343344
345+ stage = key [: - len ("__runtime__total" )]
346+ elapsed_seconds [stage + "__elapsed_seconds" ] = delta .total_seconds ()
347+
344348 if failed :
345349 metrics_dict ["total_time" ] = "ERR"
350+ metrics_dict ["total_elapsed_seconds" ] = "ERR"
346351 else :
347352 metrics_dict ["total_time" ] = str (total )
353+ metrics_dict ["total_elapsed_seconds" ] = total .total_seconds ()
354+
355+ metrics_dict .update (elapsed_seconds )
348356
349357 metrics_dict = {
350358 key .replace (":" , "__" ): value for key , value in metrics_dict .items ()
You can’t perform that action at this time.
0 commit comments