MCPcopy Create free account
hub / github.com/agenticsorg/lean-agentic / test_cache_efficiency

Function test_cache_efficiency

lean-agentic/src/arena.rs:239–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237
238 #[test]
239 fn test_cache_efficiency() {
240 let mut arena = Arena::new();
241
242 // Create many duplicate terms
243 for _ in 0..100 {
244 arena.mk_var(0);
245 }
246
247 // Should have high cache hit rate
248 assert!(arena.cache_hit_rate() > 0.95);
249 assert_eq!(arena.terms(), 1);
250 }
251}

Callers

nothing calls this directly

Calls 1

mk_varMethod · 0.80

Tested by

no test coverage detected