MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / get_exec_counter_value

Function get_exec_counter_value

src/program/mod.rs:27–30  ·  view source on GitHub ↗
(key: &str)

Source from the content-addressed store, hash-verified

25static EXEC_COUNTER: OnceCell<RwLock<HashMap<String, u32>>> = OnceCell::new();
26
27pub fn get_exec_counter_value(key: &str) -> Option<u32> {
28 let guard = EXEC_COUNTER.get_or_init(|| RwLock::new(HashMap::new())).read().unwrap();
29 guard.get(key).copied()
30}
31
32pub fn set_exec_counter_value(key: String, value: u32) {
33 let mut guard = EXEC_COUNTER.get_or_init(|| RwLock::new(HashMap::new())).write().unwrap();

Callers 3

update_energiesMethod · 0.85
compute_qualityMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected