summaryrefslogtreecommitdiffstats
path: root/tools/run-bisect-perf-regression.py
diff options
context:
space:
mode:
authorsullivan@chromium.org <sullivan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 09:33:19 +0000
committersullivan@chromium.org <sullivan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 09:35:16 +0000
commit7b9ef3c646aaa8be474d025cdff82fe43af264c8 (patch)
tree1df2ec8b1dd43c31e3ce4294f78f55adcd421a9c /tools/run-bisect-perf-regression.py
parentcbcd0df2c71f14c2bf9557083fcbba3b104aabb8 (diff)
downloadchromium_src-7b9ef3c646aaa8be474d025cdff82fe43af264c8.zip
chromium_src-7b9ef3c646aaa8be474d025cdff82fe43af264c8.tar.gz
chromium_src-7b9ef3c646aaa8be474d025cdff82fe43af264c8.tar.bz2
Remove requirement that bisects for perf trybots specify a metric.
BUG=401180 Review URL: https://codereview.chromium.org/466313004 Cr-Commit-Position: refs/heads/master@{#289832} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/run-bisect-perf-regression.py')
-rwxr-xr-xtools/run-bisect-perf-regression.py45
1 files changed, 27 insertions, 18 deletions
diff --git a/tools/run-bisect-perf-regression.py b/tools/run-bisect-perf-regression.py
index 58edfc8..9095ae2 100755
--- a/tools/run-bisect-perf-regression.py
+++ b/tools/run-bisect-perf-regression.py
@@ -151,7 +151,6 @@ def _ValidatePerfConfigFile(config_contents):
"""
valid_parameters = [
'command',
- 'metric',
'repeat_count',
'truncate_percent',
'max_time_minutes',
@@ -195,7 +194,7 @@ def _CreateBisectOptionsFromConfig(config):
print config['command']
opts_dict = {}
opts_dict['command'] = config['command']
- opts_dict['metric'] = config['metric']
+ opts_dict['metric'] = config.get('metric')
if config['repeat_count']:
opts_dict['repeat_test_count'] = int(config['repeat_count'])
@@ -312,25 +311,32 @@ def _RunPerformanceTest(config, path_to_file):
cloud_file_link = ''
# Calculate the % difference in the means of the 2 runs.
- percent_diff_in_means = (results_with_patch[0]['mean'] /
- max(0.0001, results_without_patch[0]['mean'])) * 100.0 - 100.0
- std_err = math_utils.PooledStandardError(
- [results_with_patch[0]['values'], results_without_patch[0]['values']])
+ percent_diff_in_means = None
+ std_err = None
+ if (results_with_patch[0].has_key('mean') and
+ results_with_patch[0].has_key('values')):
+ percent_diff_in_means = (results_with_patch[0]['mean'] /
+ max(0.0001, results_without_patch[0]['mean'])) * 100.0 - 100.0
+ std_err = math_utils.PooledStandardError(
+ [results_with_patch[0]['values'], results_without_patch[0]['values']])
bisect_utils.OutputAnnotationStepClosed()
- bisect_utils.OutputAnnotationStepStart('Results - %.02f +- %0.02f delta' %
- (percent_diff_in_means, std_err))
- print ' %s %s %s' % (''.center(10, ' '), 'Mean'.center(20, ' '),
- 'Std. Error'.center(20, ' '))
- print ' %s %s %s' % ('Patch'.center(10, ' '),
- ('%.02f' % results_with_patch[0]['mean']).center(20, ' '),
- ('%.02f' % results_with_patch[0]['std_err']).center(20, ' '))
- print ' %s %s %s' % ('No Patch'.center(10, ' '),
- ('%.02f' % results_without_patch[0]['mean']).center(20, ' '),
- ('%.02f' % results_without_patch[0]['std_err']).center(20, ' '))
- if cloud_file_link:
+ if percent_diff_in_means is not None and std_err is not None:
+ bisect_utils.OutputAnnotationStepStart('Results - %.02f +- %0.02f delta' %
+ (percent_diff_in_means, std_err))
+ print ' %s %s %s' % (''.center(10, ' '), 'Mean'.center(20, ' '),
+ 'Std. Error'.center(20, ' '))
+ print ' %s %s %s' % ('Patch'.center(10, ' '),
+ ('%.02f' % results_with_patch[0]['mean']).center(20, ' '),
+ ('%.02f' % results_with_patch[0]['std_err']).center(20, ' '))
+ print ' %s %s %s' % ('No Patch'.center(10, ' '),
+ ('%.02f' % results_without_patch[0]['mean']).center(20, ' '),
+ ('%.02f' % results_without_patch[0]['std_err']).center(20, ' '))
+ if cloud_file_link:
+ bisect_utils.OutputAnnotationStepLink('HTML Results', cloud_file_link)
+ bisect_utils.OutputAnnotationStepClosed()
+ elif cloud_file_link:
bisect_utils.OutputAnnotationStepLink('HTML Results', cloud_file_link)
- bisect_utils.OutputAnnotationStepClosed()
def _SetupAndRunPerformanceTest(config, path_to_file, path_to_goma):
@@ -385,6 +391,9 @@ def _RunBisectionScript(
'--working_directory', working_directory,
'--output_buildbot_annotations']
+ if config.get('metric'):
+ cmd.extend(['-m', config['metric']])
+
if config['repeat_count']:
cmd.extend(['-r', config['repeat_count']])