File tree Expand file tree Collapse file tree
aggregation_mode/gateway/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ impl GatewayServer {
248248 return HttpResponse :: BadRequest ( ) . json ( AppResponse :: new_unsucessfull ( message, 400 ) ) ;
249249 } ;
250250
251- let start = Instant :: now ( ) ;
251+ let query_started_at = Instant :: now ( ) ;
252252
253253 match state
254254 . db
@@ -263,10 +263,10 @@ impl GatewayServer {
263263 . await
264264 {
265265 Ok ( task_id) => {
266- let duration = start . elapsed ( ) ;
266+ let time_elapsed_db_call = query_started_at . elapsed ( ) ;
267267 state
268268 . metrics
269- . register_db_response_time_post ( "sp1-post" , duration . as_secs_f64 ( ) ) ;
269+ . register_db_response_time_post ( "sp1-post" , time_elapsed_db_call . as_secs_f64 ( ) ) ;
270270
271271 HttpResponse :: Ok ( ) . json ( AppResponse :: new_sucessfull (
272272 serde_json:: json!( { "task_id" : task_id. to_string( ) } ) ,
You can’t perform that action at this time.
0 commit comments