Esempio n. 1
0
  public long getEstimatedDuration() {
    List<RunT> builds = getLastBuildsOverThreshold(3, Result.UNSTABLE);

    if (builds.isEmpty()) return -1;

    long totalDuration = 0;
    for (RunT b : builds) {
      totalDuration += b.getDuration();
    }
    if (totalDuration == 0) return -1;

    return Math.round((double) totalDuration / builds.size());
  }