@@ -192,8 +192,7 @@ async fn test_management_api_call_rate() {
192192 let final_metrics = get_auth_metrics ( & fixture. ctx ) . await ;
193193
194194 if let ( Some ( initial) , Some ( final_metrics) ) = ( initial_metrics, final_metrics) {
195- let control_calls =
196- final_metrics. control_calls - initial. control_calls ;
195+ let control_calls = final_metrics. control_calls - initial. control_calls ;
197196 let api_call_rate = ( control_calls as f64 / num_requests as f64 ) * 100.0 ;
198197
199198 println ! (
@@ -203,10 +202,7 @@ async fn test_management_api_call_rate() {
203202
204203 // Control call rate should be <10% with effective caching
205204 if api_call_rate > 10.0 {
206- eprintln ! (
207- "Warning: High control call rate ({:.1}%) - expected <10%" ,
208- api_call_rate
209- ) ;
205+ eprintln ! ( "Warning: High control call rate ({:.1}%) - expected <10%" , api_call_rate) ;
210206 }
211207 } else {
212208 println ! ( "⚠ Metrics endpoint not available - skipping API call rate check" ) ;
@@ -265,17 +261,15 @@ struct AuthMetrics {
265261
266262// Helper function to fetch and parse auth metrics (from internal port)
267263async fn get_auth_metrics ( ctx : & TestContext ) -> Option < AuthMetrics > {
268- let response =
269- ctx. client . get ( format ! ( "{}/metrics" , ctx. engine_mesh_url) ) . send ( ) . await . ok ( ) ?;
264+ let response = ctx. client . get ( format ! ( "{}/metrics" , ctx. engine_mesh_url) ) . send ( ) . await . ok ( ) ?;
270265
271266 if !response. status ( ) . is_success ( ) {
272267 return None ;
273268 }
274269
275270 let metrics_text = response. text ( ) . await . ok ( ) ?;
276271
277- let control_calls =
278- parse_metric ( & metrics_text, "infera_auth_control_calls_total" ) ;
272+ let control_calls = parse_metric ( & metrics_text, "infera_auth_control_calls_total" ) ;
279273 let cache_hits = parse_metric ( & metrics_text, "infera_auth_cache_hits_total" ) ;
280274 let cache_misses = parse_metric ( & metrics_text, "infera_auth_cache_misses_total" ) ;
281275
0 commit comments