Index: bench/gen_bench_expectations.py |
diff --git a/bench/gen_bench_expectations.py b/bench/gen_bench_expectations.py |
index 4212c0e05b44538e37bd75b6d5e94f0a4ea2e220..75035ffda77f89a94f49d8184f142f931b1ebe3f 100644 |
--- a/bench/gen_bench_expectations.py |
+++ b/bench/gen_bench_expectations.py |
@@ -12,8 +12,10 @@ import re |
import sys |
# Parameters for calculating bench ranges. |
-RANGE_RATIO = 1.0 # Ratio of range for upper and lower bounds. |
+RANGE_RATIO_UPPER = 1.0 # Ratio of range for upper bounds. |
+RANGE_RATIO_LOWER = 1.5 # Ratio of range for lower bounds. |
ERR_RATIO = 0.05 # Further widens the range by the ratio of average value. |
+ERR_ABS = 0.5 # Adds an absolute error margin to cope with very small benches. |
# List of bench configs to monitor. Ignore all other configs. |
CONFIGS_TO_INCLUDE = ['simple_viewport_1000x1000', |
@@ -37,8 +39,8 @@ def compute_ranges(benches): |
diff = maximum - minimum |
avg = sum(benches) / len(benches) |
- return [minimum - diff * RANGE_RATIO - avg * ERR_RATIO, |
- maximum + diff * RANGE_RATIO + avg * ERR_RATIO] |
+ return [minimum - diff * RANGE_RATIO_LOWER - avg * ERR_RATIO - ERR_ABS, |
+ maximum + diff * RANGE_RATIO_UPPER + avg * ERR_RATIO + ERR_ABS] |
def create_expectations_dict(revision_data_points): |