Skip to content

Commit

Permalink
Merge pull request #837 from kutzi/estimated-time
Browse files Browse the repository at this point in the history
[FIXED JENKINS-18196] Change to the estimated duratrion calculation to prevent performance issues with lazy build loading
Originally-Committed-As: 12e9a55c39b0e8db47578fbc9f7ff87cf25fca93
  • Loading branch information
kohsuke committed Jul 17, 2013
2 parents a685160 + 5db4f90 commit ad5401e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/hudson/maven/MavenModuleSet.java
Expand Up @@ -1112,6 +1112,11 @@ private List<Queue.Item> filter(Collection<Queue.Item> base) {
public String getUserConfiguredGoals() {
return goals;
}

@Override
protected List<MavenModuleSetBuild> getEstimatedDurationCandidates() {
return super.getEstimatedDurationCandidates();
}

/*package*/ void reconfigure(PomInfo rootPom) throws IOException {
if(this.rootModule!=null && this.rootModule.equals(rootPom.name))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/maven/MavenModuleSetBuild.java
Expand Up @@ -333,7 +333,7 @@ public long getEstimatedDuration() {
* to the sum of durations of the module builds.
*/
private long estimateModuleSetBuildDurationOverhead(int numberOfBuilds) {
List<MavenModuleSetBuild> moduleSetBuilds = getPreviousBuildsOverThreshold(numberOfBuilds, Result.UNSTABLE);
List<MavenModuleSetBuild> moduleSetBuilds = getParent().getEstimatedDurationCandidates();

if (moduleSetBuilds.isEmpty()) {
return 0;
Expand Down

0 comments on commit ad5401e

Please sign in to comment.