From aaa342471b02cc283c83e44829ecb1bae7a7beeb Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 31 Aug 2018 11:44:08 +0200 Subject: Add timings collect script --- timings.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 timings.py 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) -- cgit v1.2.3-54-g00ecf