hydra-queue-runner: Tweaked the selection method

[?]
Sep 21, 2013, 7:54 PM
MMUBEIGVTTY7OESMGVEOL7EC7HNTSGFIIOC5C3UHKVFYHJ75EMVAC

Dependencies

  • [2] GEADFVZ5 hydra-queue-runner: Improved scheduling
  • [3] YEXD7CBK Fix findBuildDependencyInQueue
  • [4] X3YLTWJA hydra-queue-runner: Cache the lookup of time spent per jobset
  • [5] OV7F5M3E Merge branch 'queue-17'
  • [6] TFLAR4KA hydra-queue-runner: Start as many builds as possible on each iteration
  • [*] 7YBYT2LQ

Change contents

  • replacement in src/script/hydra-queue-runner at line 148
    [2.4973][2.4973:5122]()
    my $share = $jobset->schedulingshares;
    my $delta = ($share / $totalShares) - ($duration / $totalWindowSize);
    [2.4973]
    [2.5122]
    my $share = $jobset->schedulingshares || 1; # prevent division by zero
    my $used = $timeSpent / ($totalWindowSize * ($share / $totalShares));
  • replacement in src/script/hydra-queue-runner at line 151
    [2.5123][2.5123:5299]()
    #printf STDERR "%s:%s: %d s, %.3f%%, allowance = %.3f%%\n", $jobset->get_column('project'), $jobset->name, $duration, $duration / $totalWindowSize, $delta;
    [2.5123]
    [2.5299]
    #printf STDERR "%s:%s: %d s, total used = %.2f%%, share used = %.2f%%\n", $jobset->get_column('project'), $jobset->name, $timeSpent, $timeSpent / $totalWindowSize * 100, $used * 100;
  • replacement in src/script/hydra-queue-runner at line 153
    [2.5300][2.5300:5371]()
    push @res, { jobset => $jobset, delta => $delta };
    [2.5300]
    [3.864]
    push @res, { jobset => $jobset, used => $used };
  • replacement in src/script/hydra-queue-runner at line 156
    [2.5373][2.5373:5449]()
    foreach my $r (sort { $b->{delta} <=> $a->{delta} } @res) {
    [2.5373]
    [2.5449]
    foreach my $r (sort { $a->{used} <=> $b->{used} } @res) {
  • replacement in src/script/hydra-queue-runner at line 176
    [2.6510][2.6510:6750]()
    printf STDERR "starting build %d (%s:%s:%s) on %s (jobset allowance = %.3f%%)\n",
    $build->id, $build->project->name, $build->jobset->name, $build->job->name, $build->system, $r->{delta};
    [2.6510]
    [3.110]
    printf STDERR "starting build %d (%s:%s:%s) on %s; jobset at %.2f%% of its share\n",
    $build->id, $build->project->name, $build->jobset->name, $build->job->name, $build->system, $r->{used} * 100;