@@ -773,6 +773,7 @@ def execute(
773773 Returns
774774 Result: Return Result object that create from execution context.
775775 """
776+ ts : float = time .monotonic ()
776777 parent_run_id : str = run_id
777778 run_id : str = gen_id ((self .id or "EMPTY" ), unique = True )
778779 trace : Trace = get_trace (
@@ -790,7 +791,7 @@ def execute(
790791 params ,
791792 run_id = parent_run_id ,
792793 event = event ,
793- )
794+ ). make_info ({ "execution_time" : time . monotonic () - ts })
794795 elif self .runs_on .type == SELF_HOSTED : # pragma: no cov
795796 pass
796797 elif self .runs_on .type == AZ_BATCH : # pragma: no cov
@@ -802,7 +803,7 @@ def execute(
802803 run_id = run_id ,
803804 parent_run_id = parent_run_id ,
804805 event = event ,
805- )
806+ ). make_info ({ "execution_time" : time . monotonic () - ts })
806807
807808 trace .error (
808809 f"[JOB]: Execution not support runs-on: { self .runs_on .type .value !r} "
@@ -819,6 +820,8 @@ def execute(
819820 f"not support yet."
820821 ).to_dict (),
821822 },
823+ info = {"execution_time" : time .monotonic () - ts },
824+ extras = self .extras ,
822825 )
823826
824827
@@ -1010,6 +1013,7 @@ def local_execute(
10101013
10111014 :rtype: Result
10121015 """
1016+ ts : float = time .monotonic ()
10131017 parent_run_id : StrOrNone = run_id
10141018 run_id : str = gen_id ((job .id or "EMPTY" ), unique = True )
10151019 trace : Trace = get_trace (
@@ -1028,6 +1032,7 @@ def local_execute(
10281032 parent_run_id = parent_run_id ,
10291033 status = SKIP ,
10301034 context = catch (context , status = SKIP ),
1035+ info = {"execution_time" : time .monotonic () - ts },
10311036 extras = job .extras ,
10321037 )
10331038
@@ -1056,6 +1061,7 @@ def local_execute(
10561061 ).to_dict ()
10571062 },
10581063 ),
1064+ info = {"execution_time" : time .monotonic () - ts },
10591065 extras = job .extras ,
10601066 )
10611067
@@ -1127,6 +1133,7 @@ def local_execute(
11271133 parent_run_id = parent_run_id ,
11281134 status = status ,
11291135 context = catch (context , status = status , updated = errors ),
1136+ info = {"execution_time" : time .monotonic () - ts },
11301137 extras = job .extras ,
11311138 )
11321139
0 commit comments