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

Side by Side Diff: tools/bisect-perf-regression.py

Issue 596963002: Simplifying repro instructions from bisect output for non telemetry cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Performance Test Bisect Tool 6 """Performance Test Bisect Tool
7 7
8 This script bisects a series of changelists using binary search. It starts at 8 This script bisects a series of changelists using binary search. It starts at
9 a bad revision where a performance metric has regressed, and asks for a last 9 a bad revision where a performance metric has regressed, and asks for a last
10 known-good revision. It will then binary search across this revision range by 10 known-good revision. It will then binary search across this revision range by
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 RESULTS_REVISION_INFO = """ 205 RESULTS_REVISION_INFO = """
206 ===== SUSPECTED CL(s) ===== 206 ===== SUSPECTED CL(s) =====
207 Subject : %(subject)s 207 Subject : %(subject)s
208 Author : %(author)s%(email_info)s%(commit_info)s 208 Author : %(author)s%(email_info)s%(commit_info)s
209 Commit : %(cl)s 209 Commit : %(cl)s
210 Date : %(cl_date)s""" 210 Date : %(cl_date)s"""
211 211
212 REPRO_STEPS_LOCAL = """ 212 REPRO_STEPS_LOCAL = """
213 ==== INSTRUCTIONS TO REPRODUCE ==== 213 ==== INSTRUCTIONS TO REPRODUCE ====
214 To run locally: 214 To run locally:
215 $%(command)s""" 215 - Use Test Command given under BISECT JOB RESULTS above.
qyearsley 2014/09/24 03:03:04 What do you think about tweaking this a bit to 'Us
216 - Consider using a profiler (pass --profiler=list to list the available ones).
qyearsley 2014/09/24 03:03:04 Possible suggestion: You can use a profiler; pass
217 """
216 218
217 REPRO_STEPS_TRYJOB = """ 219 REPRO_STEPS_TRYJOB = """
218 To reproduce on a performance try bot: 220 To reproduce on a performance try bot:
219 1. Create new git branch or check out existing branch. 221 1. Edit run-perf-test.cfg
220 2. Edit tools/run-perf-test.cfg (instructions in file) or \ 222 2. Upload your patch with: $ git cl upload --bypass-hooks
221 third_party/WebKit/Tools/run-perf-test.cfg. 223 3. Send to the try server: $ git cl try -m tryserver.chromium.perf -b <bot>
qyearsley 2014/09/24 03:03:04 git cl upload and git cl try is actually not neces
222 a) Take care to strip any src/ directories from the head of \ 224
223 relative path names. 225 Notes:
224 b) On desktop, only --browser=release is supported, on android \ 226 a) Follow the in-file instructions in run-perf-test.cfg.
225 --browser=android-chromium-testshell. 227 b) run-perf-test.cfg is under tools/ or under third_party/WebKit/Tools.
226 c) Test command to use: %(command)s 228 c) Do your edits preferably under a new git branch.
227 3. Upload your patch. --bypass-hooks is necessary to upload the changes you \ 229 d) --browser=release and --browser=android-chromium-testshell are supported
228 committed locally to run-perf-test.cfg. 230 depending on the platform (desktop|android).
229 Note: *DO NOT* commit run-perf-test.cfg changes to the project repository. 231 e) Strip any src/ directories from the head of relative path names.
230 $ git cl upload --bypass-hooks 232 f) Make sure to use the appropriate bot on step 3.
231 4. Send your try job to the try server. \
232 [Please make sure to use appropriate bot to reproduce]
233 $ git cl try -m tryserver.chromium.perf -b <bot>
234 233
235 For more details please visit 234 For more details please visit
236 https://sites.google.com/a/chromium.org/dev/developers/performance-try-bots""" 235 https://sites.google.com/a/chromium.org/dev/developers/performance-try-bots"""
237 236
238 REPRO_STEPS_TRYJOB_TELEMETRY = """ 237 REPRO_STEPS_TRYJOB_TELEMETRY = """
239 To reproduce on a performance try bot: 238 To reproduce on a performance try bot:
240 %(command)s 239 %(command)s
241 (Where <bot-name> comes from tools/perf/run_benchmark --browser=list) 240 (Where <bot-name> comes from tools/perf/run_benchmark --browser=list)
242 241
243 For more details please visit 242 For more details please visit
244 https://sites.google.com/a/chromium.org/dev/developers/performance-try-bots 243 https://sites.google.com/a/chromium.org/dev/developers/performance-try-bots
245 """ 244 """
246 245
247 RESULTS_THANKYOU = """ 246 RESULTS_THANKYOU = """
248 ===== THANK YOU FOR CHOOSING BISECT AIRLINES ===== 247 ===== THANK YOU FOR CHOOSING BISECT AIRLINES =====
249 Visit http://www.chromium.org/developers/core-principles for Chrome's policy 248 Visit http://www.chromium.org/developers/core-principles for Chrome's policy
250 on perf regressions. 249 on perf regressions.
251 Contact chrome-perf-dashboard-team with any questions or suggestions about 250 Contact chrome-perf-dashboard-team with any questions or suggestions about
252 bisecting. 251 bisecting.
253 . .------. 252 . .-----.
254 . .---. \ \==) 253 . .---. \ \==)
255 . |PERF\ \ \\ 254 . |PERF\ \ \\
256 . | ---------'-------'-----------. 255 . | ---------'-------'-----------.
257 . . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 `-. 256 . . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |_`-.
258 . \______________.-------._______________) 257 . \_____________.-------._______________)
259 . / / 258 . / /
260 . / / 259 . / /
261 . / /==) 260 . / /==)
262 . ._______.""" 261 . ._____."""
263 262
264 263
265 def _AddAdditionalDepotInfo(depot_info): 264 def _AddAdditionalDepotInfo(depot_info):
266 """Adds additional depot info to the global depot variables.""" 265 """Adds additional depot info to the global depot variables."""
267 global DEPOT_DEPS_NAME 266 global DEPOT_DEPS_NAME
268 global DEPOT_NAMES 267 global DEPOT_NAMES
269 DEPOT_DEPS_NAME = dict(DEPOT_DEPS_NAME.items() + depot_info.items()) 268 DEPOT_DEPS_NAME = dict(DEPOT_DEPS_NAME.items() + depot_info.items())
270 DEPOT_NAMES = DEPOT_DEPS_NAME.keys() 269 DEPOT_NAMES = DEPOT_DEPS_NAME.keys()
271 270
272 271
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 Returns: 2202 Returns:
2204 A tuple with the new bad and good revisions. 2203 A tuple with the new bad and good revisions.
2205 """ 2204 """
2206 # DONOT perform nudge because at revision 291563 .DEPS.git was removed 2205 # DONOT perform nudge because at revision 291563 .DEPS.git was removed
2207 # and source contain only DEPS file for dependency changes. 2206 # and source contain only DEPS file for dependency changes.
2208 if good_svn_revision >= 291563: 2207 if good_svn_revision >= 291563:
2209 return (bad_revision, good_revision) 2208 return (bad_revision, good_revision)
2210 2209
2211 if self.source_control.IsGit() and self.opts.target_platform == 'chromium': 2210 if self.source_control.IsGit() and self.opts.target_platform == 'chromium':
2212 changes_to_deps = self.source_control.QueryFileRevisionHistory( 2211 changes_to_deps = self.source_control.QueryFileRevisionHistory(
2213 FILE_DEPS, good_revision, bad_revision) 2212 bisect_utils.FILE_DEPS, good_revision, bad_revision)
2214 2213
2215 if changes_to_deps: 2214 if changes_to_deps:
2216 # DEPS file was changed, search from the oldest change to DEPS file to 2215 # DEPS file was changed, search from the oldest change to DEPS file to
2217 # bad_revision to see if there are matching .DEPS.git changes. 2216 # bad_revision to see if there are matching .DEPS.git changes.
2218 oldest_deps_change = changes_to_deps[-1] 2217 oldest_deps_change = changes_to_deps[-1]
2219 changes_to_gitdeps = self.source_control.QueryFileRevisionHistory( 2218 changes_to_gitdeps = self.source_control.QueryFileRevisionHistory(
2220 bisect_utils.FILE_DEPS_GIT, oldest_deps_change, bad_revision) 2219 bisect_utils.FILE_DEPS_GIT, oldest_deps_change, bad_revision)
2221 2220
2222 if len(changes_to_deps) != len(changes_to_gitdeps): 2221 if len(changes_to_deps) != len(changes_to_gitdeps):
2223 # Grab the timestamp of the last DEPS change 2222 # Grab the timestamp of the last DEPS change
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 2746
2748 def _PrintReproSteps(self): 2747 def _PrintReproSteps(self):
2749 """Prints out a section of the results explaining how to run the test. 2748 """Prints out a section of the results explaining how to run the test.
2750 2749
2751 This message includes the command used to run the test. 2750 This message includes the command used to run the test.
2752 """ 2751 """
2753 command = '$ ' + self.opts.command 2752 command = '$ ' + self.opts.command
2754 if bisect_utils.IsTelemetryCommand(self.opts.command): 2753 if bisect_utils.IsTelemetryCommand(self.opts.command):
2755 command += ('\nAlso consider passing --profiler=list to see available ' 2754 command += ('\nAlso consider passing --profiler=list to see available '
2756 'profilers.') 2755 'profilers.')
2757 print REPRO_STEPS_LOCAL % {'command': command} 2756 print REPRO_STEPS_LOCAL
2758 if bisect_utils.IsTelemetryCommand(self.opts.command): 2757 if bisect_utils.IsTelemetryCommand(self.opts.command):
2759 telemetry_command = re.sub(r'--browser=[^\s]+', 2758 telemetry_command = re.sub(r'--browser=[^\s]+',
2760 '--browser=<bot-name>', 2759 '--browser=<bot-name>',
2761 command) 2760 command)
2762 print REPRO_STEPS_TRYJOB_TELEMETRY % {'command': telemetry_command} 2761 print REPRO_STEPS_TRYJOB_TELEMETRY % {'command': telemetry_command}
2763 else: 2762 else:
2764 print REPRO_STEPS_TRYJOB % {'command': command} 2763 print REPRO_STEPS_TRYJOB
2765 2764
2766 def _PrintOtherRegressions(self, other_regressions, revision_data): 2765 def _PrintOtherRegressions(self, other_regressions, revision_data):
2767 """Prints a section of the results about other potential regressions.""" 2766 """Prints a section of the results about other potential regressions."""
2768 print 2767 print
2769 print 'Other regressions may have occurred:' 2768 print 'Other regressions may have occurred:'
2770 print ' %8s %70s %10s' % ('Depot'.center(8, ' '), 2769 print ' %8s %70s %10s' % ('Depot'.center(8, ' '),
2771 'Range'.center(70, ' '), 'Confidence'.center(10, ' ')) 2770 'Range'.center(70, ' '), 'Confidence'.center(10, ' '))
2772 for regression in other_regressions: 2771 for regression in other_regressions:
2773 current_id, previous_id, confidence = regression 2772 current_id, previous_id, confidence = regression
2774 current_data = revision_data[current_id] 2773 current_data = revision_data[current_id]
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
3398 # bugs. If you change this, please update the perf dashboard as well. 3397 # bugs. If you change this, please update the perf dashboard as well.
3399 bisect_utils.OutputAnnotationStepStart('Results') 3398 bisect_utils.OutputAnnotationStepStart('Results')
3400 print 'Error: %s' % e.message 3399 print 'Error: %s' % e.message
3401 if opts.output_buildbot_annotations: 3400 if opts.output_buildbot_annotations:
3402 bisect_utils.OutputAnnotationStepClosed() 3401 bisect_utils.OutputAnnotationStepClosed()
3403 return 1 3402 return 1
3404 3403
3405 3404
3406 if __name__ == '__main__': 3405 if __name__ == '__main__':
3407 sys.exit(main()) 3406 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698