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

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

Issue 1911583003: Equalizing samples when comparing middle revision against good and bad. (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.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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 True if the results of testing this revision are significantly different 537 True if the results of testing this revision are significantly different
538 from those of testing the earliest known bad revision. 538 from those of testing the earliest known bad revision.
539 False if they are instead significantly different form those of testing 539 False if they are instead significantly different form those of testing
540 the latest knwon good revision. 540 the latest knwon good revision.
541 """ 541 """
542 542
543 if self.bisector.is_return_code_mode(): 543 if self.bisector.is_return_code_mode():
544 return self.overall_return_code == self.bisector.lkgr.overall_return_code 544 return self.overall_return_code == self.bisector.lkgr.overall_return_code
545 545
546 while True: 546 while True:
547 truncate_length = min(len(x) for x in (self.bisector.lkgr.values,
548 self.bisector.fkbr.values))
dtu 2016/04/20 23:01:17 A little bit weird for taking the min of just two
RobertoCN 2016/04/20 23:13:33 done. Agreed. revision_state will be gutted soon
547 diff_from_good = self.bisector.significantly_different( 549 diff_from_good = self.bisector.significantly_different(
548 self.bisector.lkgr.values, self.values) 550 self.bisector.lkgr.values[:truncate_length], self.values)
549 diff_from_bad = self.bisector.significantly_different( 551 diff_from_bad = self.bisector.significantly_different(
550 self.bisector.fkbr.values, self.values) 552 self.bisector.fkbr.values[:truncate_length], self.values)
551 553
552 if diff_from_good and diff_from_bad: 554 if diff_from_good and diff_from_bad:
553 # Multiple regressions. 555 # Multiple regressions.
554 # For now, proceed bisecting the biggest difference of the means. 556 # For now, proceed bisecting the biggest difference of the means.
555 dist_from_good = abs(self.mean_value - self.bisector.lkgr.mean_value) 557 dist_from_good = abs(self.mean_value - self.bisector.lkgr.mean_value)
556 dist_from_bad = abs(self.mean_value - self.bisector.fkbr.mean_value) 558 dist_from_bad = abs(self.mean_value - self.bisector.fkbr.mean_value)
557 if dist_from_good > dist_from_bad: 559 if dist_from_good > dist_from_bad:
558 # TODO(robertocn): Add way to handle the secondary regression 560 # TODO(robertocn): Add way to handle the secondary regression
559 #self.bisector.handle_secondary_regression(self, self.bisector.fkbr) 561 #self.bisector.handle_secondary_regression(self, self.bisector.fkbr)
560 return False 562 return False
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 else: 601 else:
600 next_revision_to_test.retest() 602 next_revision_to_test.retest()
601 603
602 def __repr__(self): 604 def __repr__(self):
603 if self.overall_return_code is not None: 605 if self.overall_return_code is not None:
604 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, ' 606 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, '
605 'std_dev=%r)') % (self.revision_string(), self.values, 607 'std_dev=%r)') % (self.revision_string(), self.values,
606 self.overall_return_code, self.std_dev) 608 self.overall_return_code, self.std_dev)
607 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % ( 609 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % (
608 self.revision_string(), self.values, self.mean_value, self.std_dev)) 610 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.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698