diff --git a/src/top_evil_rs.py b/src/top_evil_rs.py index f7518e29f..a64c3f4b7 100755 --- a/src/top_evil_rs.py +++ b/src/top_evil_rs.py @@ -12,13 +12,13 @@ if __name__ == "__main__": s = re.sub(r"(?m)///.*$", "", s) # remove comments unsafe = s.count("unsafe") free = s.count("free(") - gotoblocks = s.count("current_block =") + gotoblocks = s.count("ok_to_continue") filestats.append((fn, unsafe, free, gotoblocks)) sum_unsafe, sum_free, sum_gotoblocks = 0, 0, 0 for fn, unsafe, free, gotoblocks in reversed(sorted(filestats, key=lambda x: sum(x[1:]))): - print("{0: <30} unsafe: {1: >3} free: {2: >3} goto-blocks: {3: >3}".format(str(fn), unsafe, free, gotoblocks)) + print("{0: <30} unsafe: {1: >3} free: {2: >3} ok_to_continue: {3: >3}".format(str(fn), unsafe, free, gotoblocks)) sum_unsafe += unsafe sum_free += free sum_gotoblocks += gotoblocks @@ -27,5 +27,5 @@ if __name__ == "__main__": print() print("total unsafe:", sum_unsafe) print("total free:", sum_free) - print("total gotoblocks:", sum_gotoblocks) + print("total ok_to_continue:", sum_gotoblocks)