From 8d0d7de38a97f5c7e8f37b423aab804978406838 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 19 Aug 2016 14:53:37 +0200 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- parse_res.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 parse_res.py (limited to 'parse_res.py') 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() -- cgit v1.2.3-54-g00ecf