MCPcopy Create free account
hub / github.com/erans/pgsqlite / get_stats

Method get_stats

src/protocol/rate_limiter.rs:607–619  ·  view source on GitHub ↗

Get rate limiting statistics

(&self)

Source from the content-addressed store, hash-verified

605
606 /// Get rate limiting statistics
607 pub fn get_stats(&self) -> RateLimitStats {
608 let global_window = self.global_window.read();
609 let ip_windows = self.ip_windows.read();
610 let (circuit_state, circuit_failures, circuit_successes) = self.circuit_state.get_state();
611
612 RateLimitStats {
613 global_requests: global_window.get_request_count(),
614 tracked_ips: ip_windows.len(),
615 circuit_state,
616 circuit_failures,
617 circuit_successes,
618 }
619 }
620
621 /// Reset all rate limiting state
622 pub fn reset(&self) {

Callers 1

Calls 4

readMethod · 0.80
get_stateMethod · 0.80
get_request_countMethod · 0.80
lenMethod · 0.45

Tested by 1