Add scripts to create myops-getqueryview:
[myops.git] / web / collect / server / stats.py
diff --git a/web/collect/server/stats.py b/web/collect/server/stats.py
new file mode 100755 (executable)
index 0000000..8afd03a
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+import sys
+
+def getListFromFile(f):
+       list = []
+       for line in f:
+               line = line.strip()
+               list += [line]
+       return list
+
+l = getListFromFile(sys.stdin)
+l = [ float(x) for x in l ]
+# mean and standard deviation
+ls = len(l)
+print "05th", l[int(ls*0.05)]
+print "25th", l[int(ls*0.25)]
+print "50th", l[int(ls*0.50)]
+print "75th", l[int(ls*0.75)]
+print "95th", l[int(ls*0.95)]
+