@@ -459,7 +459,8 @@ async fn handle_connection<T: RemoteBackend + Send + Sync + 'static>(
459459 METRICS . update_metric_histogram_latency ( "get_hit_latency_ms" , start. elapsed ( ) , MetricType :: MsLatency ) ;
460460 METRICS . update_metric_counter ( "hit" , 1 ) ;
461461 METRICS . update_hitratio ( HitType :: Hit ) ;
462- METRICS . update_metric_counter ( "written_bytes_total" , chunk. size ) ;
462+ METRICS . update_metric_counter ( "read_bytes_total" , chunk. size ) ;
463+ METRICS . update_metric_counter ( "bytes_total" , chunk. size ) ;
463464 tracing:: debug!( "REQ[{}] CACHE HIT completed successfully" , request_id) ;
464465 Ok ( ( ) )
465466 }
@@ -541,7 +542,8 @@ async fn handle_connection<T: RemoteBackend + Send + Sync + 'static>(
541542 METRICS . update_metric_counter ( "miss" , 1 ) ;
542543 METRICS . update_metric_histogram_latency ( "get_miss_latency_ms" , start. elapsed ( ) , MetricType :: MsLatency ) ;
543544 METRICS . update_hitratio ( HitType :: Miss ) ;
544- METRICS . update_metric_counter ( "read_bytes_total" , chunk_size) ;
545+ METRICS . update_metric_counter ( "written_bytes_total" , chunk_size) ;
546+ METRICS . update_metric_counter ( "bytes_total" , chunk_size) ;
545547 tracing:: debug!( "REQ[{}] CACHE MISS completed successfully" , request_id) ;
546548 Ok ( write_response)
547549 }
@@ -551,7 +553,6 @@ async fn handle_connection<T: RemoteBackend + Send + Sync + 'static>(
551553 std:: io:: Error :: new ( std:: io:: ErrorKind :: Other , format ! ( "cache.get_or_insert_with failed: {}" , e) )
552554 } ) ?;
553555 tracing:: debug!( "REQ[{}] Request completed successfully" , request_id) ;
554- METRICS . update_metric_counter ( "bytes_total" , chunk_size) ;
555556 }
556557 request:: Request :: Close => {
557558 tracing:: debug!( "Received close request" ) ;
0 commit comments