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

Side by Side Diff: build/android/pylib/perf/test_runner.py

Issue 1403263002: [Sharded Perf Tests] Disambiguate same benchmark on different steps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 """Runs perf tests. 5 """Runs perf tests.
6 6
7 Our buildbot infrastructure requires each slave to run steps serially. 7 Our buildbot infrastructure requires each slave to run steps serially.
8 This is sub-optimal for android, where these steps can run independently on 8 This is sub-optimal for android, where these steps can run independently on
9 multiple connected devices. 9 multiple connected devices.
10 10
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 self._CleanupOutputDirectory() 385 self._CleanupOutputDirectory()
386 if self._options.single_step: 386 if self._options.single_step:
387 logfile.stop() 387 logfile.stop()
388 end_time = time.time() 388 end_time = time.time()
389 if exit_code is None: 389 if exit_code is None:
390 exit_code = -1 390 exit_code = -1
391 logging.info('%s : exit_code=%d in %d secs at %s', 391 logging.info('%s : exit_code=%d in %d secs at %s',
392 test_name, exit_code, end_time - start_time, 392 test_name, exit_code, end_time - start_time,
393 self.device_serial) 393 self.device_serial)
394 394
395 try:
396 # Some perf configs run the same benchmark with different options on
397 # different step names. Here we disambiguate those, so that data is
398 # uploaded to the perf dashoards based on their step name instead.
399 chart_data = json.loads(json_output)
400 if chart_data['benchmark_name'] != test_name:
401 logging.info('Benchmark %r will be reported as %r in chartjson.',
402 chart_data['benchmark_name'], test_name)
403 chart_data['telemetry_benchmark_name'] = chart_data['benchmark_name']
404 chart_data['benchmark_name'] = test_name
405 json_output = json.dumps(chart_data, sort_keys=True, indent=2,
406 separators=(',', ': '))
407 except StandardError:
408 logging.exception('Could not read data from chartjson.')
409
395 if exit_code == 0: 410 if exit_code == 0:
396 result_type = base_test_result.ResultType.PASS 411 result_type = base_test_result.ResultType.PASS
397 else: 412 else:
398 result_type = base_test_result.ResultType.FAIL 413 result_type = base_test_result.ResultType.FAIL
399 # Since perf tests use device affinity, give the device a chance to 414 # Since perf tests use device affinity, give the device a chance to
400 # recover if it is offline after a failure. Otherwise, the master sharder 415 # recover if it is offline after a failure. Otherwise, the master sharder
401 # will remove it from the pool and future tests on this device will fail. 416 # will remove it from the pool and future tests on this device will fail.
402 try: 417 try:
403 self.device.WaitUntilFullyBooted(timeout=120) 418 self.device.WaitUntilFullyBooted(timeout=120)
404 except device_errors.CommandTimeoutError as e: 419 except device_errors.CommandTimeoutError as e:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 Returns: 454 Returns:
440 A tuple of (TestRunResults, retry). 455 A tuple of (TestRunResults, retry).
441 """ 456 """
442 _, result_type = self._LaunchPerfTest(test_name) 457 _, result_type = self._LaunchPerfTest(test_name)
443 results = base_test_result.TestRunResults() 458 results = base_test_result.TestRunResults()
444 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 459 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
445 retry = None 460 retry = None
446 if not results.DidRunPass(): 461 if not results.DidRunPass():
447 retry = test_name 462 retry = test_name
448 return results, retry 463 return results, retry
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