    Blocking waiting for file lock on build directory
   Compiling api_gateway v1.0.0 (/home/jgrusewski/Work/foxhunt/services/api_gateway)
warning: type `HealthState` is more private than the item `backtesting_proxy::HealthChecker::get_state`
  --> services/api_gateway/src/grpc/backtesting_proxy.rs:93:5
   |
93 |     pub async fn get_state(&self) -> HealthState {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `backtesting_proxy::HealthChecker::get_state` is reachable at visibility `pub`
   |
note: but type `HealthState` is only usable at visibility `pub(self)`
  --> services/api_gateway/src/grpc/backtesting_proxy.rs:32:1
   |
32 | enum HealthState {
   | ^^^^^^^^^^^^^^^^
   = note: `#[warn(private_interfaces)]` on by default

warning: fields `issuer` and `audience` are never read
   --> services/api_gateway/src/auth/interceptor.rs:314:5
    |
308 | pub struct JwtService {
    |            ---------- fields in this struct
...
314 |     issuer: String,
    |     ^^^^^^
315 |     /// Expected audience
316 |     audience: String,
    |     ^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: field `user_id` is never read
  --> services/api_gateway/src/config/authz.rs:36:5
   |
35 | struct UserPermissions {
   |        --------------- field in this struct
36 |     user_id: Uuid,
   |     ^^^^^^^
   |
   = note: `UserPermissions` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

warning: fields `role_name`, `permissions`, and `loaded_at` are never read
  --> services/api_gateway/src/config/authz.rs:44:5
   |
43 | struct RolePermissions {
   |        --------------- fields in this struct
44 |     role_name: String,
   |     ^^^^^^^^^
45 |     permissions: HashSet<String>,
   |     ^^^^^^^^^^^
46 |     loaded_at: Instant,
   |     ^^^^^^^^^
   |
   = note: `RolePermissions` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

warning: fields `last_health_check` and `health_check_interval` are never read
  --> services/api_gateway/src/grpc/backtesting_proxy.rs:42:5
   |
39 | pub struct HealthChecker {
   |            ------------- fields in this struct
...
42 |     last_health_check: RwLock<Instant>,
   |     ^^^^^^^^^^^^^^^^^
43 |     failure_threshold: u32,
44 |     health_check_interval: Duration,
   |     ^^^^^^^^^^^^^^^^^^^^^

warning: method `has_tokens` is never used
  --> services/api_gateway/src/routing/rate_limiter.rs:52:8
   |
38 | impl TokenBucket {
   | ---------------- method in this implementation
...
52 |     fn has_tokens(&self) -> bool {
   |        ^^^^^^^^^^

warning: `api_gateway` (lib) generated 6 warnings
warning: unused variable: `auth_interceptor`
  --> services/api_gateway/src/main.rs:93:9
   |
93 |     let auth_interceptor = AuthInterceptor::new(
   |         ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_auth_interceptor`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: `api_gateway` (lib) generated 6 warnings (6 duplicates)
warning: fields `tokens` and `last_access` are never read
  --> services/api_gateway/benches/dashmap_rate_limiter_bench.rs:20:5
   |
19 | struct CacheEntry {
   |        ---------- fields in this struct
20 |     tokens: f64,
   |     ^^^^^^
21 |     last_access: Instant,
   |     ^^^^^^^^^^^
   |
   = note: `CacheEntry` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: `api_gateway` (bench "dashmap_rate_limiter_bench") generated 1 warning
warning: `api_gateway` (bin "api_gateway") generated 1 warning
    Finished `bench` profile [optimized] target(s) in 3m 01s
     Running benches/dashmap_rate_limiter_bench.rs (/home/jgrusewski/Work/foxhunt/target/release/deps/dashmap_rate_limiter_bench-13898daf45d06025)
DashMap vs RwLock Performance Comparison
==========================================

Benchmark 1: Sequential Reads (100000 iterations)
  RwLock:  94 ns/op
  DashMap: 84 ns/op
  Speedup: 1.12x
  Target:  <8ns ✓

Benchmark 2: Concurrent Reads (4 threads, 100000 total ops)
  RwLock:  246 ns/op
  DashMap: 84 ns/op
  Speedup: 2.93x
  Target:  <8ns ✓

Benchmark 3: High Contention (8 threads, 100000 total ops)
  RwLock:  321 ns/op
  DashMap: 50 ns/op
  Speedup: 6.42x
  Target:  <8ns ✓

Benchmark 4: Mixed Workload - 10% writes (100000 ops)
  RwLock:  103 ns/op
  DashMap: 84 ns/op
  Speedup: 1.23x
  Target:  <8ns ✓

Benchmark 5: Rate Limiter Workload - 1% writes (100000 ops)
  RwLock:  96 ns/op
  DashMap: 83 ns/op
  Speedup: 1.16x
  Target:  <8ns ✓

==========================================
Performance Summary:
  Sequential:       1.12x improvement (94 ns → 84 ns)
  Concurrent (4T):  2.93x improvement (246 ns → 84 ns)
  Concurrent (8T):  6.42x improvement (321 ns → 50 ns)
  Mixed (10% W):    1.23x improvement (103 ns → 84 ns)
  Rate Limiter:     1.16x improvement (96 ns → 83 ns)

✓ All benchmarks completed successfully
✓ Target <8ns achieved: false
