Add scripts to create myops-getqueryview:
[myops.git] / web / collect / server / stats.py
1 #!/usr/bin/python
2
3 import sys
4
5 def getListFromFile(f):
6         list = []
7         for line in f:
8                 line = line.strip()
9                 list += [line]
10         return list
11
12 l = getListFromFile(sys.stdin)
13 l = [ float(x) for x in l ]
14 # mean and standard deviation
15 ls = len(l)
16 print "05th", l[int(ls*0.05)]
17 print "25th", l[int(ls*0.25)]
18 print "50th", l[int(ls*0.50)]
19 print "75th", l[int(ls*0.75)]
20 print "95th", l[int(ls*0.95)]
21