summaryrefslogtreecommitdiffstats
path: root/parse_res.py
diff options
context:
space:
mode:
Diffstat (limited to 'parse_res.py')
-rw-r--r--parse_res.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/parse_res.py b/parse_res.py
new file mode 100644
index 0000000..eea2972
--- /dev/null
+++ b/parse_res.py
@@ -0,0 +1,27 @@
+from pprint import pprint
+import statistics
+
+def main():
+ results = {}
+ with open("results") as f:
+ for line in f.readlines():
+ (function, input_file, time) = line.split(" ")
+
+ if input_file not in results:
+ results[input_file] = {}
+
+ if function not in results[input_file]:
+ results[input_file][function] = []
+
+ results[input_file][function].append(float(time.split("PT")[1].split("S")[0]))
+
+ for input_file in sorted(results.keys()):
+ for function in sorted(results[input_file].keys()):
+ line = results[input_file][function]
+
+ print("{} {}:\n mean: {}\n stdev: {}\n"
+ .format(function, input_file,
+ statistics.mean(line),
+ statistics.pstdev(line)))
+
+main()