Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: scripts/slave/recipe_modules/perf_try/api.py

Issue 1573293002: Change auto_bisect to post results to perf dashboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: update Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/perf_try/api.py
diff --git a/scripts/slave/recipe_modules/perf_try/api.py b/scripts/slave/recipe_modules/perf_try/api.py
index 8afc07941938b5b06b01fb8ccd1c1b705b92ffba..3bcc2789c203d84323e0f6258bf27db35468b88a 100644
--- a/scripts/slave/recipe_modules/perf_try/api.py
+++ b/scripts/slave/recipe_modules/perf_try/api.py
@@ -11,7 +11,7 @@ platform for any test that can be run via buildbot, perf or otherwise.
import re
from recipe_engine import recipe_api
-
+from . import bisect_results_json
PERF_CONFIG_FILE = 'tools/run-perf-test.cfg'
WEBKIT_PERF_CONFIG_FILE = 'third_party/WebKit/Tools/run-perf-test.cfg'
@@ -89,9 +89,17 @@ class PerfTryJobApi(recipe_api.RecipeApi):
'profiler_link2': ('%s - Profiler Data' % 'Without Patch'
if r[1] is None else r[1])
}
+
+ # TODO(chrisphan): Deprecate this. perf_dashboard.post_bisect below
+ # already outputs data in json format.
self._compare_and_present_results(
test_cfg, results_without_patch, results_with_patch, labels)
+ bisect_results = bisect_results_json.get(
+ self, test_cfg, results_without_patch, results_with_patch, labels)
+ self.m.perf_dashboard.set_default_config()
+ self.m.perf_dashboard.post_bisect(bisect_results, halt_on_failure=True)
+
def run_cq_job(self, update_step, master_dict, files_in_patch):
"""Runs benchmarks affected by a CL on CQ."""
buildername = self.m.properties['buildername']
@@ -283,8 +291,8 @@ class PerfTryJobApi(recipe_api.RecipeApi):
values_with_patch = results_with_patch.get('results').get('values')
values_without_patch = results_without_patch.get('results').get('values')
- cloud_links_without_patch = _parse_cloud_links(output_without_patch)
- cloud_links_with_patch = _parse_cloud_links(output_with_patch)
+ cloud_links_without_patch = self.parse_cloud_links(output_without_patch)
+ cloud_links_with_patch = self.parse_cloud_links(output_with_patch)
results_link = (cloud_links_without_patch['html'][0]
if cloud_links_without_patch['html'] else '')
@@ -353,17 +361,15 @@ class PerfTryJobApi(recipe_api.RecipeApi):
labels.get('profiler_link2'), i): profiler_without_patch[i]
})
+ def parse_cloud_links(self, output):
+ html_results_pattern = re.compile(CLOUD_RESULTS_LINK, re.MULTILINE)
+ profiler_pattern = re.compile(PROFILER_RESULTS_LINK, re.MULTILINE)
-def _parse_cloud_links(output):
- html_results_pattern = re.compile(CLOUD_RESULTS_LINK, re.MULTILINE)
- profiler_pattern = re.compile(PROFILER_RESULTS_LINK, re.MULTILINE)
-
- results = {
- 'html': html_results_pattern.findall(output),
- 'profiler': profiler_pattern.findall(output),
- }
-
- return results
+ results = {
+ 'html': html_results_pattern.findall(output),
+ 'profiler': profiler_pattern.findall(output),
+ }
+ return results
def _validate_perf_config(config_contents, required_parameters):

Powered by Google App Engine
This is Rietveld 408576698