Index: bench/gen_bench_expectations.py |
diff --git a/bench/gen_bench_expectations.py b/bench/gen_bench_expectations.py |
index 5a9e1e495b86c4d97d6151fdeaeb205cdbab07c7..af0e46509163136e5514b70e5b0091ba0235acc3 100644 |
--- a/bench/gen_bench_expectations.py |
+++ b/bench/gen_bench_expectations.py |
@@ -46,13 +46,14 @@ def compute_ranges(benches): |
Returns: |
a list of float [lower_bound, upper_bound]. |
""" |
- minimum = min(benches) |
- maximum = max(benches) |
- diff = maximum - minimum |
avg = sum(benches) / len(benches) |
+ squared_avg = avg ** 2 |
+ avg_squared = sum([bench**2 for bench in benches])/len(benches) |
+ std_dev = (avg_squared - squared_avg) ** 0.5 |
- return [minimum - diff * RANGE_RATIO_LOWER - avg * ERR_RATIO - ERR_LB, |
- maximum + diff * RANGE_RATIO_UPPER + avg * ERR_RATIO + ERR_UB] |
+ # If the results are normally distributed, 2 standard deviations |
+ # captures something like ~95% of the possible range of results I think |
+ return [avg - 2*std_dev, avg + 2*std_dev] |
benchen
2014/06/10 19:59:23
Sometimes for some combinations the results from t
|
def create_expectations_dict(revision_data_points, builder): |