code: private Double fetchBuildSuccessRatio(Iterable<Build> builds) {
      int totalBuilds = 0, totalSuccess = 0;
      for (Build build : builds) {
        if (Constants.IGNORE_STATUS.contains(build.getBuildStatus())) {
          continue;
        }
  
        totalBuilds++;
        if (Constants.SUCCESS_STATUS.contains(build.getBuildStatus())) {
          totalSuccess++;
        }
      }
      if (totalBuilds == 0) {
        return 0.0d;
      }
      return ((totalSuccess * 100) / (double) totalBuilds);
    }
docs: Calculate percentage of successful builds
  Any build with status InProgress, Aborted is excluded from calculation
  Builds with status as Success, Unstable is included as success build
  
  @param builds iterable build
  @return percentage of build success