File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,8 @@ pub async fn process_event_with_backoff(
374374 gas_limit : U256 ,
375375 metrics : Arc < KeeperMetrics > ,
376376) {
377+ let start_time = std:: time:: Instant :: now ( ) ;
378+
377379 metrics
378380 . requests
379381 . get_or_create ( & AccountLabel {
@@ -404,6 +406,16 @@ pub async fn process_event_with_backoff(
404406 tracing:: error!( "Failed to process event: {:?}" , e) ;
405407 }
406408 }
409+
410+ let duration_ms = start_time. elapsed ( ) . as_millis ( ) as f64 ;
411+ metrics
412+ . request_duration_ms
413+ . get_or_create ( & AccountLabel {
414+ chain_id : chain_state. id . clone ( ) ,
415+ address : chain_state. provider_address . to_string ( ) ,
416+ } )
417+ . observe ( duration_ms) ;
418+
407419 metrics
408420 . requests_processed
409421 . get_or_create ( & AccountLabel {
You can’t perform that action at this time.
0 commit comments