summaryrefslogtreecommitdiff
path: root/bench/stats.py
diff options
context:
space:
mode:
Diffstat (limited to 'bench/stats.py')
-rw-r--r--bench/stats.py11
1 files changed, 11 insertions, 0 deletions
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)))
+