Lines 789-808
sub current()
Link Here
|
789 |
# For a better prediction we only consider the last 10 merges |
789 |
# For a better prediction we only consider the last 10 merges |
790 |
# to have a better bias to latest system changes. |
790 |
# to have a better bias to latest system changes. |
791 |
my $num_elems = min(9, $#merge_times); |
791 |
my $num_elems = min(9, $#merge_times); |
792 |
@merge_times = @merge_times[0..$num_elems]; |
792 |
@merge_times = @merge_times[0..$num_elems]; |
793 |
|
793 |
|
794 |
# Now slice off the worst and best performing time to create |
794 |
# Now slice off the worst and best performing time to create |
795 |
# a better prediction by removing exceptional performers. |
795 |
# a better prediction by removing exceptional performers. |
796 |
@merge_times = sort(@merge_times); |
796 |
@merge_times = sort(@merge_times); |
797 |
@merge_times = @merge_times[1..8] if $#merge_times > 9; |
797 |
@merge_times = @merge_times[1..8] if $#merge_times > 8; |
798 |
|
798 |
|
799 |
$e_count = 1; |
799 |
$e_count = 1; |
800 |
$tm_secondi = sum(@merge_times) / $#merge_times; |
800 |
$tm_secondi = sum(@merge_times) / ($#merge_times + 1); |
801 |
} |
801 |
} |
802 |
|
802 |
|
803 |
>ime($tm_secondi - ($e_end - $e_start)); |
803 |
>ime($tm_secondi - ($e_end - $e_start)); |
804 |
if (($e_end - $e_start) >= $tm_secondi) |
804 |
if (($e_end - $e_start) >= $tm_secondi) |
805 |
{ |
805 |
{ |
806 |
print colored("any time now.\n", $COLORS{'green'}); |
806 |
print colored("any time now.\n", $COLORS{'green'}); |
807 |
} |
807 |
} |
808 |
else |
808 |
else |