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

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

Issue 687733003: Change configs/try.py to get the list of config files to use from args. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add android_gn_perf_bisect Created 6 years, 1 month 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 | « tools/auto_bisect/configs/win.bisect.blink_perf.cfg ('k') | 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 """Run Performance Test Bisect Tool 6 """Run Performance Test Bisect Tool
7 7
8 This script is used by a try bot to run the bisect script with the parameters 8 This script is used by a try bot to run the bisect script with the parameters
9 specified in the bisect config file. It checks out a copy of the depot in 9 specified in the bisect config file. It checks out a copy of the depot in
10 a subdirectory 'bisect' of the working directory provided, annd runs the 10 a subdirectory 'bisect' of the working directory provided, annd runs the
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 Attempts to build and run the current revision with and without the 242 Attempts to build and run the current revision with and without the
243 current patch, with the parameters passed in. 243 current patch, with the parameters passed in.
244 """ 244 """
245 # Bisect script expects to be run from the src directory 245 # Bisect script expects to be run from the src directory
246 os.chdir(SRC_DIR) 246 os.chdir(SRC_DIR)
247 247
248 bisect_utils.OutputAnnotationStepStart('Building With Patch') 248 bisect_utils.OutputAnnotationStepStart('Building With Patch')
249 249
250 opts = _CreateBisectOptionsFromConfig(config) 250 opts = _CreateBisectOptionsFromConfig(config)
251 b = bisect_perf_regression.BisectPerformanceMetrics(opts) 251 b = bisect_perf_regression.BisectPerformanceMetrics(opts, os.getcwd())
252 252
253 if bisect_utils.RunGClient(['runhooks']): 253 if bisect_utils.RunGClient(['runhooks']):
254 raise RuntimeError('Failed to run gclient runhooks') 254 raise RuntimeError('Failed to run gclient runhooks')
255 255
256 if not b.BuildCurrentRevision('chromium'): 256 if not b.ObtainBuild('chromium'):
257 raise RuntimeError('Patched version failed to build.') 257 raise RuntimeError('Patched version failed to build.')
258 258
259 bisect_utils.OutputAnnotationStepClosed() 259 bisect_utils.OutputAnnotationStepClosed()
260 bisect_utils.OutputAnnotationStepStart('Running With Patch') 260 bisect_utils.OutputAnnotationStepStart('Running With Patch')
261 261
262 results_with_patch = b.RunPerformanceTestAndParseResults( 262 results_with_patch = b.RunPerformanceTestAndParseResults(
263 opts.command, opts.metric, reset_on_first_run=True, results_label='Patch') 263 opts.command, opts.metric, reset_on_first_run=True, results_label='Patch')
264 264
265 if results_with_patch[1]: 265 if results_with_patch[1]:
266 raise RuntimeError('Patched version failed to run performance test.') 266 raise RuntimeError('Patched version failed to run performance test.')
267 267
268 bisect_utils.OutputAnnotationStepClosed() 268 bisect_utils.OutputAnnotationStepClosed()
269 269
270 bisect_utils.OutputAnnotationStepStart('Reverting Patch') 270 bisect_utils.OutputAnnotationStepStart('Reverting Patch')
271 # TODO: When this is re-written to recipes, this should use bot_update's 271 # TODO: When this is re-written to recipes, this should use bot_update's
272 # revert mechanism to fully revert the client. But for now, since we know that 272 # revert mechanism to fully revert the client. But for now, since we know that
273 # the perf try bot currently only supports src/ and src/third_party/WebKit, we 273 # the perf try bot currently only supports src/ and src/third_party/WebKit, we
274 # simply reset those two directories. 274 # simply reset those two directories.
275 bisect_utils.CheckRunGit(['reset', '--hard']) 275 bisect_utils.CheckRunGit(['reset', '--hard'])
276 bisect_utils.CheckRunGit(['reset', '--hard'], 276 bisect_utils.CheckRunGit(['reset', '--hard'],
277 os.path.join('third_party', 'WebKit')) 277 os.path.join('third_party', 'WebKit'))
278 bisect_utils.OutputAnnotationStepClosed() 278 bisect_utils.OutputAnnotationStepClosed()
279 279
280 bisect_utils.OutputAnnotationStepStart('Building Without Patch') 280 bisect_utils.OutputAnnotationStepStart('Building Without Patch')
281 281
282 if bisect_utils.RunGClient(['runhooks']): 282 if bisect_utils.RunGClient(['runhooks']):
283 raise RuntimeError('Failed to run gclient runhooks') 283 raise RuntimeError('Failed to run gclient runhooks')
284 284
285 if not b.BuildCurrentRevision('chromium'): 285 if not b.ObtainBuild('chromium'):
286 raise RuntimeError('Unpatched version failed to build.') 286 raise RuntimeError('Unpatched version failed to build.')
287 287
288 bisect_utils.OutputAnnotationStepClosed() 288 bisect_utils.OutputAnnotationStepClosed()
289 bisect_utils.OutputAnnotationStepStart('Running Without Patch') 289 bisect_utils.OutputAnnotationStepStart('Running Without Patch')
290 290
291 results_without_patch = b.RunPerformanceTestAndParseResults( 291 results_without_patch = b.RunPerformanceTestAndParseResults(
292 opts.command, opts.metric, upload_on_last_run=True, results_label='ToT') 292 opts.command, opts.metric, upload_on_last_run=True, results_label='ToT')
293 293
294 if results_without_patch[1]: 294 if results_without_patch[1]:
295 raise RuntimeError('Unpatched version failed to run performance test.') 295 raise RuntimeError('Unpatched version failed to run performance test.')
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if config and config_is_valid: 563 if config and config_is_valid:
564 return _SetupAndRunPerformanceTest(config, opts.path_to_goma) 564 return _SetupAndRunPerformanceTest(config, opts.path_to_goma)
565 565
566 print ('Error: Could not load config file. Double check your changes to ' 566 print ('Error: Could not load config file. Double check your changes to '
567 'auto_bisect/bisect.cfg or run-perf-test.cfg for syntax errors.\n') 567 'auto_bisect/bisect.cfg or run-perf-test.cfg for syntax errors.\n')
568 return 1 568 return 1
569 569
570 570
571 if __name__ == '__main__': 571 if __name__ == '__main__':
572 sys.exit(main()) 572 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/auto_bisect/configs/win.bisect.blink_perf.cfg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698