diff options
author | prasadv <prasadv@chromium.org> | 2015-01-23 11:39:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-23 19:40:40 +0000 |
commit | 45fb44fa04e109fa880f2dea9e7235039203dc93 (patch) | |
tree | 70cdfe8848d2e10100fce205713ef445491805a9 /tools/auto_bisect | |
parent | 89d942d08f17ade7aedfe1e4ee075ab90140061b (diff) | |
download | chromium_src-45fb44fa04e109fa880f2dea9e7235039203dc93.zip chromium_src-45fb44fa04e109fa880f2dea9e7235039203dc93.tar.gz chromium_src-45fb44fa04e109fa880f2dea9e7235039203dc93.tar.bz2 |
Avoid finding mean for an empty metrics.
BUG=451476
NOTRY=True
Review URL: https://codereview.chromium.org/861033004
Cr-Commit-Position: refs/heads/master@{#312897}
Diffstat (limited to 'tools/auto_bisect')
-rwxr-xr-x | tools/auto_bisect/bisect_perf_regression.py | 5 | ||||
-rw-r--r-- | tools/auto_bisect/bisect_perf_regression_test.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/auto_bisect/bisect_perf_regression.py b/tools/auto_bisect/bisect_perf_regression.py index 635adbd..6cd0ebe 100755 --- a/tools/auto_bisect/bisect_perf_regression.py +++ b/tools/auto_bisect/bisect_perf_regression.py @@ -1318,8 +1318,9 @@ class BisectPerformanceMetrics(object): print output if metric and self._IsBisectModeUsingMetric(): - metric_values.append(math_utils.Mean( - _ParseMetricValuesFromOutput(metric, output))) + parsed_metric = _ParseMetricValuesFromOutput(metric, output) + if parsed_metric: + metric_values.append(math_utils.Mean(parsed_metric)) # If we're bisecting on a metric (ie, changes in the mean or # standard deviation) and no metric values are produced, bail out. if not metric_values: diff --git a/tools/auto_bisect/bisect_perf_regression_test.py b/tools/auto_bisect/bisect_perf_regression_test.py index c10ed78..b71fab6 100644 --- a/tools/auto_bisect/bisect_perf_regression_test.py +++ b/tools/auto_bisect/bisect_perf_regression_test.py @@ -433,6 +433,7 @@ class BisectPerfRegressionTest(unittest.TestCase): @mock.patch('bisect_utils.RunGClient') def testSyncToRevisionForChromium(self, mock_RunGClient): bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS) + mock_RunGClient.return_value = 0 bisect_instance._SyncRevision( 'chromium', 'e6db23a037cad47299a94b155b95eebd1ee61a58', 'gclient') expected_params = [ |