@@ -84,7 +84,7 @@ def extract_response_and_result(results_path, client, test_case_name, gas_used,
8484 print (f"Method '{ method_key } ' not found in sections for file { result_file } . Available methods: { list (sections .keys ())} " )
8585 # Get timestamp from first available section, or 0 if no sections exist
8686 timestamp = getattr (next (iter (sections .values ())), 'timestamp' , 0 ) if sections else 0
87- return False , 0 , timestamp , 0
87+ return False , 0 , timestamp , 0 , 0 , 0
8888 result = sections [method_key ].fields [field ]
8989 timestamp = getattr (sections [method_key ], 'timestamp' , 0 )
9090 # Extract total running time if available (in milliseconds)
@@ -93,7 +93,22 @@ def extract_response_and_result(results_path, client, test_case_name, gas_used,
9393 total_running_time_section = sections ['[Application] Total Running Time' ]
9494 if 'sum' in total_running_time_section .fields :
9595 total_running_time_ms = float (total_running_time_section .fields ['sum' ])
96- return response , float (result ), timestamp , total_running_time_ms
96+
97+ # Extract FCU (engine_forkchoiceUpdatedV3) duration
98+ fcu_duration_ms = 0
99+ if '[Application] engine_forkchoiceUpdatedV3' in sections :
100+ fcu_section = sections ['[Application] engine_forkchoiceUpdatedV3' ]
101+ if 'sum' in fcu_section .fields :
102+ fcu_duration_ms = float (fcu_section .fields ['sum' ])
103+
104+ # Extract NP (engine_newPayloadV4) duration
105+ np_duration_ms = 0
106+ if '[Application] engine_newPayloadV4' in sections :
107+ np_section = sections ['[Application] engine_newPayloadV4' ]
108+ if 'sum' in np_section .fields :
109+ np_duration_ms = float (np_section .fields ['sum' ])
110+
111+ return response , float (result ), timestamp , total_running_time_ms , fcu_duration_ms , np_duration_ms
97112
98113
99114def get_gas_table (client_results , client , test_cases , gas_set , method , metadata ):
@@ -113,11 +128,13 @@ def get_gas_table(client_results, client, test_cases, gas_set, method, metadata)
113128
114129 for test_case , _ in test_cases .items ():
115130 results_norm = results_per_test_case [test_case ]
116- gas_table_norm [test_case ] = ['' for _ in range (11 )]
131+ gas_table_norm [test_case ] = ['' for _ in range (13 )]
117132 # test_case_name, description, N, MGgas/s, mean, max, min. std, p50, p95, p99
118- # (norm) title, description, N , max, min, p50, p95, p99, start_time, end_time, duration_ms
133+ # (norm) title, description, N , max, min, p50, p95, p99, start_time, end_time, duration_ms, fcu_duration_ms, np_duration_ms
119134 timestamp_ticks = client_results [client ][test_case ]["timestamp_ticks" ] if client_results [client ][test_case ] and "timestamp_ticks" in client_results [client ][test_case ] else 0
120135 duration_ms = client_results [client ][test_case ]["duration" ] if client_results [client ][test_case ] and "duration" in client_results [client ][test_case ] else 0
136+ fcu_duration_ms = client_results [client ][test_case ]["fcu_duration" ] if client_results [client ][test_case ] and "fcu_duration" in client_results [client ][test_case ] else 0
137+ np_duration_ms = client_results [client ][test_case ]["np_duration" ] if client_results [client ][test_case ] and "np_duration" in client_results [client ][test_case ] else 0
121138
122139 # Convert start timestamp to formatted string
123140 start_time_str = convert_dotnet_ticks_to_utc (timestamp_ticks ) if timestamp_ticks != 0 else 0
@@ -135,6 +152,10 @@ def get_gas_table(client_results, client, test_cases, gas_set, method, metadata)
135152
136153 # Store duration in milliseconds
137154 gas_table_norm [test_case ][10 ] = f'{ duration_ms :.2f} ' if duration_ms != 0 else '0'
155+
156+ # Store FCU and NP durations
157+ gas_table_norm [test_case ][11 ] = f'{ fcu_duration_ms :.2f} ' if fcu_duration_ms != 0 else '0'
158+ gas_table_norm [test_case ][12 ] = f'{ np_duration_ms :.2f} ' if np_duration_ms != 0 else '0'
138159
139160 if test_case in metadata :
140161 gas_table_norm [test_case ][0 ] = metadata [test_case ]['Title' ]
0 commit comments