summaryrefslogtreecommitdiff
path: root/tb3
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-08-03 01:26:21 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-08-03 01:26:21 +0200
commite17b17c3a859edbf917f62049abb260991cba5dc (patch)
treeed9fa7ccc900dfd06c1083e3806092f793d625fc /tb3
parent7e3f612be4b5d14bbaf0d15dd07e49cc14ba48f3 (diff)
update scoring
Diffstat (limited to 'tb3')
-rw-r--r--tb3/dist-packages/tb3/scheduler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tb3/dist-packages/tb3/scheduler.py b/tb3/dist-packages/tb3/scheduler.py
index 962ca0d..d9fb94f 100644
--- a/tb3/dist-packages/tb3/scheduler.py
+++ b/tb3/dist-packages/tb3/scheduler.py
@@ -72,7 +72,7 @@ class HeadScheduler(Scheduler):
if not last_build is None:
commits = self.get_commits(last_build, head)
for commit in commits:
- proposals.append(self.make_proposal(1-1/((len(commits)-float(commit[0]))**2+1), commit[1]))
+ proposals.append(self.make_proposal(1-1/((len(commits)-0.5-float(commit[0]))**2+1), commit[1]))
reduce_all = self.dampen_running_commits(commits, proposals, time)
else:
proposals.append(self.make_proposal(float(1), head))
@@ -92,7 +92,7 @@ class BisectScheduler(Scheduler):
for commit in commits:
proposals.append(self.make_proposal(1.0, commit[1]))
for idx in range(len(proposals)):
- proposals[idx].score *= (1-1/(float(idx)**2+1)) * (1-1/((float(idx+1-len(proposals)))**2+1))
+ proposals[idx].score *= (1-1/(float(idx+0.5)**2+1)) * (1-1/((float(idx+0.5-len(proposals)))**2+1))
reduce_all = self.dampen_running_commits(commits, proposals, time)
self.norm_results(proposals, reduce_all)
return proposals