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

Method compute_branch_coverage

src/feedback/branches.rs:244–256  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

242 }
243
244 pub fn compute_branch_coverage(&self) -> (usize, usize) {
245 let mut covered_branch = 0;
246 let mut total_branch = 0;
247 for func_state in self.branches.values() {
248 for branch_state in func_state.get_branches() {
249 if branch_state.bucket != BUCKET_MASK {
250 covered_branch += 1;
251 }
252 total_branch += 1;
253 }
254 }
255 (covered_branch, total_branch)
256 }
257
258 pub fn get_covered_branch(&self) -> Vec<Branch> {
259 let mut covered = Vec::new();

Callers 3

dump_global_statesMethod · 0.45

Calls 1

get_branchesMethod · 0.80

Tested by 1