Skip to content

Commit 02f177e

Browse files
committed
Add fuzzy match % to decomp.dev report
1 parent 2bf410e commit 02f177e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/scripts/gen_report.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ def compute_measures(version: str | None = None) -> Measures:
2222
matched_code = sizes[FunctionStatus.Matching]
2323
matched_functions = counts[FunctionStatus.Matching]
2424

25+
fuzzy_code = matched_code + sizes[FunctionStatus.NonMatching] + sizes[FunctionStatus.Equivalent]
26+
2527
m = Measures()
2628
m.total_code = total_code
2729
m.matched_code = matched_code
2830
m.matched_code_percent = (matched_code / total_code * 100) if total_code else 0.0
31+
m.fuzzy_match_percent = (fuzzy_code / total_code * 100) if total_code else 0.0
2932

3033
m.total_functions = total_functions
3134
m.matched_functions = matched_functions
@@ -40,6 +43,7 @@ def compute_measures(version: str | None = None) -> Measures:
4043
m.total_units = 0
4144
m.complete_units = 0
4245

46+
4347
return m
4448

4549
def build_report(version: str | None = None) -> Report:

0 commit comments

Comments
 (0)