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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/bisector.py

Issue 2031883002: Initiate the script that takes a snapshot of CPU usage (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Fix styling inconsistency and bug Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/local_bisect.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import re 6 import re
7 import time 7 import time
8 import urllib 8 import urllib
9 9
10 from . import config_validation 10 from . import config_validation
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 return '\n'.join(lines) 659 return '\n'.join(lines)
660 660
661 def print_result_debug_info(self): 661 def print_result_debug_info(self):
662 """Prints extra debug info at the end of the bisect process.""" 662 """Prints extra debug info at the end of the bisect process."""
663 lines = self._results_debug_message().splitlines() 663 lines = self._results_debug_message().splitlines()
664 # If we emit a null step then add a log to it, the log should be kept 664 # If we emit a null step then add a log to it, the log should be kept
665 # longer than 7 days (which is often needed to debug some issues). 665 # longer than 7 days (which is often needed to debug some issues).
666 self.api.m.step('Debug Info', []) 666 self.api.m.step('Debug Info', [])
667 self.api.m.step.active_result.presentation.logs['Debug Info'] = lines 667 self.api.m.step.active_result.presentation.logs['Debug Info'] = lines
668 668
669 def print_cpu(self):
670 """Prints extra debug info with CPU snapshot at the end of the bisect proces s."""
671 lines = self._results_debug_message().splitlines()
672 for revision in self.revisions:
673 lines.append(str(revision.snapshot))
674 step_name = 'Debug Info with CPU Snapshot'
675 self.api.m.step(step_name, [])
676 self.api.m.step.active_result.presentation.logs[step_name] = lines
677
669 def post_result(self, halt_on_failure=False): 678 def post_result(self, halt_on_failure=False):
670 """Posts bisect results to Perf Dashboard.""" 679 """Posts bisect results to Perf Dashboard."""
671 self.api.m.perf_dashboard.set_default_config() 680 self.api.m.perf_dashboard.set_default_config()
672 self.api.m.perf_dashboard.post_bisect_results( 681 self.api.m.perf_dashboard.post_bisect_results(
673 self.get_result(), halt_on_failure) 682 self.get_result(), halt_on_failure)
674 683
675 def get_revision_to_eval(self): 684 def get_revision_to_eval(self):
676 """Gets the next RevisionState object in the candidate range. 685 """Gets the next RevisionState object in the candidate range.
677 686
678 Returns: 687 Returns:
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 }) 954 })
946 return revision_rows 955 return revision_rows
947 956
948 def _get_build_url(self): 957 def _get_build_url(self):
949 properties = self.api.m.properties 958 properties = self.api.m.properties
950 bot_url = properties.get('buildbotURL', 959 bot_url = properties.get('buildbotURL',
951 'http://build.chromium.org/p/chromium/') 960 'http://build.chromium.org/p/chromium/')
952 builder_name = urllib.quote(properties.get('buildername', '')) 961 builder_name = urllib.quote(properties.get('buildername', ''))
953 builder_number = str(properties.get('buildnumber', '')) 962 builder_number = str(properties.get('buildnumber', ''))
954 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) 963 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/local_bisect.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698