summaryrefslogtreecommitdiffstats
path: root/tools/perf_expectations
diff options
context:
space:
mode:
authorcmp@chromium.org <cmp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 23:05:06 +0000
committercmp@chromium.org <cmp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 23:05:06 +0000
commit6828b76c92b1d364898535ceb16fcfa51e1caa07 (patch)
treeb8afb4d65e59375098e4f81712357ea3438f35cb /tools/perf_expectations
parentafaf6ba503bc22fd5253bfa221dfd464fce3a236 (diff)
downloadchromium_src-6828b76c92b1d364898535ceb16fcfa51e1caa07.zip
chromium_src-6828b76c92b1d364898535ceb16fcfa51e1caa07.tar.gz
chromium_src-6828b76c92b1d364898535ceb16fcfa51e1caa07.tar.bz2
Provide an exact tolerance feature for expectations.
Make it possible to set the tolerance to any value on a test-by-test basis. Initially, set the tolerance to zero and update the revision range for the static initializers test on Linux. Updated the name of the variables from 'variance' to 'tolerance' which I believe is more accurate, as well. TBR=nsylvain@chromium.org Review URL: http://codereview.chromium.org/7925028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf_expectations')
-rwxr-xr-xtools/perf_expectations/make_expectations.py16
-rw-r--r--tools/perf_expectations/perf_expectations.json2
2 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf_expectations/make_expectations.py b/tools/perf_expectations/make_expectations.py
index fef237e..1e42524 100755
--- a/tools/perf_expectations/make_expectations.py
+++ b/tools/perf_expectations/make_expectations.py
@@ -23,7 +23,7 @@ except ImportError:
__version__ = '1.0'
DEFAULT_CONFIG_FILE = 'chromium_perf_expectations.cfg'
-DEFAULT_VARIANCE = 0.05
+DEFAULT_TOLERANCE = 0.05
USAGE = ''
@@ -82,8 +82,8 @@ def GetRowData(data, key):
for subkey in ['type']:
if subkey in data[key]:
rowdata.append('"%s": "%s"' % (subkey, data[key][subkey]))
- # Finally improve/regress numbers come last.
- for subkey in ['improve', 'regress']:
+ # Finally the main numbers come last.
+ for subkey in ['improve', 'regress', 'tolerance']:
if subkey in data[key]:
rowdata.append('"%s": %s' % (subkey, data[key][subkey]))
return rowdata
@@ -159,7 +159,7 @@ def Main(args):
write_new_expectations = False
for key in perfkeys:
value = perf[key]
- variance = DEFAULT_VARIANCE
+ tolerance = value.get('tolerance', DEFAULT_TOLERANCE)
# Verify the checksum.
original_checksum = value.get('sha1', '')
@@ -276,11 +276,11 @@ def Main(args):
regress = improve
improve = temp
if regress < improve:
- regress = int(math.floor(regress - abs(regress*variance)))
- improve = int(math.ceil(improve + abs(improve*variance)))
+ regress = int(math.floor(regress - abs(regress*tolerance)))
+ improve = int(math.ceil(improve + abs(improve*tolerance)))
else:
- improve = int(math.floor(improve - abs(improve*variance)))
- regress = int(math.ceil(regress + abs(regress*variance)))
+ improve = int(math.floor(improve - abs(improve*tolerance)))
+ regress = int(math.ceil(regress + abs(regress*tolerance)))
# Calculate the new checksum to test if this is the only thing that may have
# changed.
diff --git a/tools/perf_expectations/perf_expectations.json b/tools/perf_expectations/perf_expectations.json
index e0bde85..0bbdd9f 100644
--- a/tools/perf_expectations/perf_expectations.json
+++ b/tools/perf_expectations/perf_expectations.json
@@ -47,7 +47,7 @@
"linux-release/moz/times/t": {"reva": 99393, "revb": 100034, "improve": -40, "regress": 172, "sha1": "2cf4039f"},
"linux-release/sizes/chrome-bss/bss": {"reva": 91085, "revb": 91326, "type": "absolute", "improve": 328321, "regress": 362950, "sha1": "6718b4cc"},
"linux-release/sizes/chrome-data/data": {"reva": 98413, "revb": 98423, "type": "absolute", "improve": 1199515, "regress": 1325781, "sha1": "e8545530"},
- "linux-release/sizes/chrome-si/initializers": {"reva": 99922, "revb": 100028, "type": "absolute", "improve": 295, "regress": 329, "sha1": "52496dda"},
+ "linux-release/sizes/chrome-si/initializers": {"reva": 101573, "revb": 101585, "type": "absolute", "improve": 297, "regress": 297, "tolerance": 0, "sha1": "5f5840ca"},
"linux-release/sizes/chrome-text/text": {"reva": 91010, "revb": 91326, "type": "absolute", "improve": 50924512, "regress": 56409963, "sha1": "c6eabdc8"},
"linux-release/sizes/chrome.pak/chrome.pak": {"reva": 93584, "revb": 93660, "type": "absolute", "improve": 2922846, "regress": 3230516, "sha1": "71901043"},
"linux-release/sizes/chrome/chrome": {"reva": 99734, "revb": 100028, "type": "absolute", "improve": 68631100, "regress": 75912682, "sha1": "62b2e7be"},