summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtimings.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/timings.py b/timings.py
new file mode 100755
index 0000000..7ee491b
--- /dev/null
+++ b/timings.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+import sys, os
+
+def safeChar(c):
+ if c.isalnum():
+ return c
+ else:
+ return "_{:02X}".format(ord(c))
+
+name = sys.argv[1]
+safename = "".join(safeChar(c) for c in name)
+
+for fname in os.listdir("comp_cache"):
+ parts = fname.split(".")[0].split("-")
+ if safename in parts[0:2]:
+ with open("comp_cache/" + fname) as f:
+ contents = f.read().strip()
+
+ if safename == parts[0]:
+ timing = contents.split()[3]
+ else:
+ timing = contents.split()[4]
+
+ print(timing)