MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / counter_increments

Function counter_increments

nodedb/src/control/security/observability.rs:295–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293
294 #[test]
295 fn counter_increments() {
296 let m = AuthMetrics::new();
297 m.record_auth_success("jwt");
298 m.record_auth_success("jwt");
299 m.record_auth_failure("password");
300
301 assert_eq!(m.auth_success_jwt.load(Ordering::Relaxed), 2);
302 assert_eq!(m.auth_failure_password.load(Ordering::Relaxed), 1);
303 }
304
305 #[test]
306 fn histogram_bucketing() {

Callers

nothing calls this directly

Calls 2

record_auth_successMethod · 0.45
record_auth_failureMethod · 0.45

Tested by

no test coverage detected