From 9fde0912c3d2e4255f43508118590c7c43cc71f2 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Tue, 1 Jan 2019 11:41:48 +0100 Subject: [PATCH] unnamed.py: Add completion percentage People love percentages. Gotta show our powerlevel. --- tools/unnamed.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/unnamed.py b/tools/unnamed.py index 205e1efd5..1757ae507 100755 --- a/tools/unnamed.py +++ b/tools/unnamed.py @@ -47,6 +47,7 @@ if args.rootdir: 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 @@ for line in args.symfile: 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)