[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 5/9] ts-hosts-allocate-Executive: Do not prefer fast hosts for tests



Introduce $duration_for_cost and set it to the previous formula for
build jobs, or 0 for test jobs.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-hosts-allocate-Executive |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 67b8891..fc54cda 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -496,15 +496,16 @@ sub hid_recurse ($$) {
 
     $duration_rightaway_adjust=0 if $start_time;
 
+    my $duration_for_cost = 0;
     if ($jobinfo->{recipe} =~ m/build/) {
         $variation_age= 0;
+       $duration_for_cost= $duration + $duration_rightaway_adjust;
     } elsif ($variation_age > 5*86400) {
        $variation_age= 5*86400;
     }
 
     my $cost= $start_time
-       + $duration
-       + $duration_rightaway_adjust
+       + $duration_for_cost
         - $previously_failed * 366*86400
         + ($previously_failed ? + $variation_age * 10 : - $variation_age / 30)
        - $share_reuse * 10000;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.