From: Ian Jackson Subject: [OSSTEST PATCH 5/9] ts-hosts-allocate-Executive: Do not prefer fast hosts for tests Date: Tue, 11 Nov 2014 19:41:46 +0000 Message-ID: <1415734910-4647-6-git-send-email-ian.jackson@eu.citrix.com> References: <1415734910-4647-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XoHKE-0005ix-Te for xen-devel@lists.xenproject.org; Tue, 11 Nov 2014 19:42:05 +0000 In-Reply-To: <1415734910-4647-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Introduce $duration_for_cost and set it to the previous formula for build jobs, or 0 for test jobs. Signed-off-by: Ian Jackson --- 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