Browse files

Ignore the upper bound if it is extremely big

  • Loading branch information...
1 parent 3388e10 commit c3a4db95c409ed2d0172c328a51e4dc9db4e0d28 @bcui6611 bcui6611 committed Jul 30, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 collector.py
View
16 collector.py
@@ -163,16 +163,16 @@ def process_histogram_data(self, histogram_data):
dd = {}
totals = {}
for s in vals:
- if s[0][1] > util.BIG_VALUE or s[0][2] > util.BIG_VALUE:
- #Ignore infinite bucket from stats. it will skew the final result
- continue
+ if s[0][2] > util.BIG_VALUE:
+ # Ignore the upper bound if it is exemely big
+ avg = s[0][1]
else:
avg = (s[0][1] + s[0][2]) / 2
- k = s[0][0]
- l = dd.get(k, [])
- l.append((avg, s[1]))
- dd[k] = l
- totals[k] = totals.get(k, 0) + s[1]
+ k = s[0][0]
+ l = dd.get(k, [])
+ l.append((avg, s[1]))
+ dd[k] = l
+ totals[k] = totals.get(k, 0) + s[1]
return (dd, totals)
def get_mc_stats_per_node(self, mc, stats):

0 comments on commit c3a4db9

Please sign in to comment.