From 67c5944b02d0dcabd8e928dbc997b41c03000b0b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 17 Nov 2014 10:14:24 -0800 Subject: Better benchmark. 'make bench' runs the program 20 times against a file composed of 10 copies of Pro Git (about 5MB in all). It then does statistics on the results. We run it with high priority to get more consistent timings. --- bench/stats.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bench/stats.py (limited to 'bench/stats.py') diff --git a/bench/stats.py b/bench/stats.py new file mode 100644 index 0000000..8e500e8 --- /dev/null +++ b/bench/stats.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys +import statistics + +values = [ float(x) for x in sys.stdin.readlines()] + +print("mean = %.4f, median = %.4f, stdev = %.4f, variance = %.4f" % + (statistics.mean(values), statistics.median(values), + statistics.stdev(values), statistics.variance(values))) + -- cgit v1.2.3