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

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

Issue 1843023002: Respecting repeat count for non perf bisects. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 8 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/recipes/bisect.expected/basic_return_code_test.json » ('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 """An interface for holding state and result of revisions in a bisect job. 5 """An interface for holding state and result of revisions in a bisect job.
6 6
7 When implementing support for tests other than perf, one should extend this 7 When implementing support for tests other than perf, one should extend this
8 class so that the bisect module and recipe can use it. 8 class so that the bisect module and recipe can use it.
9 9
10 See perf_revision_state for an example. 10 See perf_revision_state for an example.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 self.deps_sha_patch = self.bisector.make_deps_sha_file(self.deps_sha) 85 self.deps_sha_patch = self.bisector.make_deps_sha_file(self.deps_sha)
86 self.deps = dict(base_revision.deps) 86 self.deps = dict(base_revision.deps)
87 self.deps[self.depot_name] = self.commit_hash 87 self.deps[self.depot_name] = self.commit_hash
88 else: 88 else:
89 self.needs_patch = False 89 self.needs_patch = False
90 self.build_url = self.bisector.get_platform_gs_prefix() + self._gs_suffix() 90 self.build_url = self.bisector.get_platform_gs_prefix() + self._gs_suffix()
91 self.values = [] 91 self.values = []
92 self.mean_value = None 92 self.mean_value = None
93 self.overall_return_code = None 93 self.overall_return_code = None
94 self.std_dev = None 94 self.std_dev = None
95 self.repeat_count = MINIMUM_SAMPLE_SIZE
96 self._test_config = None 95 self._test_config = None
97 self.build_number = None 96 self.build_number = None
98 97
98 if self.bisector.test_type == 'perf':
99 self.repeat_count = MINIMUM_SAMPLE_SIZE
100 else:
101 self.repeat_count = self.bisector.bisect_config.get(
102 'repeat_count', MINIMUM_SAMPLE_SIZE)
103
99 @property 104 @property
100 def tested(self): 105 def tested(self):
101 return self.status in (RevisionState.TESTED,) 106 return self.status in (RevisionState.TESTED,)
102 107
103 @property 108 @property
104 def in_progress(self): 109 def in_progress(self):
105 return self.status in (RevisionState.BUILDING, RevisionState.TESTING, 110 return self.status in (RevisionState.BUILDING, RevisionState.TESTING,
106 RevisionState.NEED_MORE_DATA) 111 RevisionState.NEED_MORE_DATA)
107 112
108 @property 113 @property
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 else: 582 else:
578 next_revision_to_test.retest() 583 next_revision_to_test.retest()
579 584
580 def __repr__(self): 585 def __repr__(self):
581 if self.overall_return_code is not None: 586 if self.overall_return_code is not None:
582 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, ' 587 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, '
583 'std_dev=%r)') % (self.revision_string(), self.values, 588 'std_dev=%r)') % (self.revision_string(), self.values,
584 self.overall_return_code, self.std_dev) 589 self.overall_return_code, self.std_dev)
585 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % ( 590 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % (
586 self.revision_string(), self.values, self.mean_value, self.std_dev)) 591 self.revision_string(), self.values, self.mean_value, self.std_dev))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/bisect.expected/basic_return_code_test.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698