ref: 9fde0912c3d2e4255f43508118590c7c43cc71f2
parent: 3b97a15ea30b6ce8ed25828be364fb0418785af6
author: mid-kid <esteve.varela@gmail.com>
date: Tue Jan 1 06:41:48 EST 2019
unnamed.py: Add completion percentage People love percentages. Gotta show our powerlevel.
--- a/tools/unnamed.py
+++ b/tools/unnamed.py
@@ -47,6 +47,7 @@
exit(1)
# Scan all unnamed symbols from the symfile
+symbols_total = 0
symbols = set()
for line in args.symfile:
line = line.split(";")[0].strip()
@@ -54,12 +55,15 @@
if len(split) < 2:
continue
+ symbols_total += 1
+
symbol = " ".join(split[1:]).strip()
if symbol[-3:].lower() == split[0][-3:].lower():
symbols.add(symbol)
# If no object files were provided, just print what we know and exit
-print("Unnamed symbols: %d" % len(symbols))
+print("Unnamed symbols: %d (%.2f%% complete)" % (len(symbols),
+ (symbols_total - len(symbols)) / symbols_total * 100))
if not objects:
for sym in symbols:
print(sym)