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

Side by Side Diff: scripts/slave/recipe_modules/bisect_tester/api.py

Issue 1610203003: Iteratively increase sample size for good/bad classification. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebasing Created 4 years, 10 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
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 os 6 import os
7 7
8 from recipe_engine import recipe_api 8 from recipe_engine import recipe_api
9 from . import perf_test 9 from . import perf_test
10 10
(...skipping 13 matching lines...) Expand all
24 if buildername and buildername.endswith('_bisect') and cr_config: 24 if buildername and buildername.endswith('_bisect') and cr_config:
25 return True # pragma: no cover 25 return True # pragma: no cover
26 return False 26 return False
27 27
28 def load_config_from_dict(self, bisect_config): 28 def load_config_from_dict(self, bisect_config):
29 """Copies the required configuration keys to a new dict.""" 29 """Copies the required configuration keys to a new dict."""
30 return { 30 return {
31 'command': bisect_config['command'], 31 'command': bisect_config['command'],
32 'metric': bisect_config.get('metric'), 32 'metric': bisect_config.get('metric'),
33 'repeat_count': int(bisect_config.get('repeat_count', 20)), 33 'repeat_count': int(bisect_config.get('repeat_count', 20)),
34 'max_time_minutes': float(bisect_config.get('max_time_minutes', 25)), 34 # The default is to NOT timeout, hence 0.
35 'max_time_minutes': float(bisect_config.get('max_time_minutes', 0)),
35 'test_type': bisect_config.get('test_type', 'perf') 36 'test_type': bisect_config.get('test_type', 'perf')
36 } 37 }
37 38
38 def run_test(self, test_config, **kwargs): 39 def run_test(self, test_config, **kwargs):
39 """Exposes perf tests implementation.""" 40 """Exposes perf tests implementation."""
40 return perf_test.run_perf_test(self, test_config, **kwargs) 41 return perf_test.run_perf_test(self, test_config, **kwargs)
41 42
42 def digest_run_results(self, run_results, retcodes, cfg): 43 def digest_run_results(self, run_results, retcodes, cfg):
43 # TODO(qyearsley): Change this to not use cfg or retcodes and just 44 # TODO(qyearsley): Change this to not use cfg or retcodes and just
44 # return values (or error) regardless of test_type. 45 # return values (or error) regardless of test_type.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 self.m.properties['mastername'], 83 self.m.properties['mastername'],
83 self.m.properties['buildername'], 84 self.m.properties['buildername'],
84 self.m.properties['buildnumber']) 85 self.m.properties['buildnumber'])
85 local_save_results = self.m.python('saving url to temp file', 86 local_save_results = self.m.python('saving url to temp file',
86 self.resource('put_temp.py'), 87 self.resource('put_temp.py'),
87 stdout=self.m.raw_io.output(), 88 stdout=self.m.raw_io.output(),
88 stdin=self.m.raw_io.input(url)) 89 stdin=self.m.raw_io.input(url))
89 local_file = local_save_results.stdout.splitlines()[0].strip() 90 local_file = local_save_results.stdout.splitlines()[0].strip()
90 self.m.gsutil.upload( 91 self.m.gsutil.upload(
91 local_file, BUCKET, gs_filename, name=str(gs_filename)) 92 local_file, BUCKET, gs_filename, name=str(gs_filename))
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/auto_bisect/revision_state.py ('k') | scripts/slave/recipe_modules/bisect_tester/perf_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698