ScratchABit: Log time spent in executable loader.
authorPaul Sokolovsky <[email protected]>
Fri, 9 Mar 2018 09:20:39 +0000 (9 11:20 +0200)
committerPaul Sokolovsky <[email protected]>
Fri, 9 Mar 2018 09:20:39 +0000 (9 11:20 +0200)
ScratchABit.py

index fc73ecc..42880db 100755 (executable)
@@ -806,8 +806,10 @@ def parse_subareas(f):
 
 
 def load_target_file(loader, fname):
+    print("Loading %s..." % fname)
+    timer = time.time()
     entry = loader.load(engine.ADDRESS_SPACE, fname)
-    log.info("Loaded %s, entrypoint: %s", fname, hex(entry) if entry is not None else None)
+    log.info("Loaded %s in %fs, entrypoint: %s", fname, time.time() - timer, hex(entry) if entry is not None else None)
     if entry is not None:
         ENTRYPOINTS.append(("_ENTRY_", entry))