diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-09 18:57:02 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-09 18:57:02 +0000 |
commit | 093ed317cb99f4e2c3283b81cb0da16cc36b980c (patch) | |
tree | 46018706d439f498f32b59aca4f77ba000defab8 /bench | |
parent | a2cbced5f7aba08ca838ea362f9bbddbfcc86f1f (diff) |
Adjusts the bench expectations calculation to consider average value.
BUG=skia:2225
NOTRY=true
R=borenet@google.com
TBR=borenet@google.com
Author: bensong@google.com
Review URL: https://codereview.chromium.org/231513002
git-svn-id: http://skia.googlecode.com/svn/trunk@14112 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/gen_bench_expectations.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bench/gen_bench_expectations.py b/bench/gen_bench_expectations.py index 57f61c9fa7..4212c0e05b 100644 --- a/bench/gen_bench_expectations.py +++ b/bench/gen_bench_expectations.py @@ -13,7 +13,7 @@ import sys # Parameters for calculating bench ranges. RANGE_RATIO = 1.0 # Ratio of range for upper and lower bounds. -ABS_ERR = 1.0 # Additional allowed error in milliseconds. +ERR_RATIO = 0.05 # Further widens the range by the ratio of average value. # List of bench configs to monitor. Ignore all other configs. CONFIGS_TO_INCLUDE = ['simple_viewport_1000x1000', @@ -35,9 +35,10 @@ def compute_ranges(benches): minimum = min(benches) maximum = max(benches) diff = maximum - minimum + avg = sum(benches) / len(benches) - return [minimum - diff * RANGE_RATIO - ABS_ERR, - maximum + diff * RANGE_RATIO + ABS_ERR] + return [minimum - diff * RANGE_RATIO - avg * ERR_RATIO, + maximum + diff * RANGE_RATIO + avg * ERR_RATIO] def create_expectations_dict(revision_data_points): |