private static String generateProgressBar(double progress) {
    StringBuilder progressBar = new StringBuilder();
    progressBar.append('[');

    int barsToDisplay = (int) Math.round(PROGRESS_BAR_COUNT * progress);
    for (int barIndex = 0; barIndex < PROGRESS_BAR_COUNT; barIndex++) {
      progressBar.append(barIndex < barsToDisplay ? '=' : ' ');
    }

    return progressBar
        .append(']')
        .append(String.format(" %.1f", progress * 100))
        .append("% complete")
        .toString();
  }
Generates the progress bar line.

@param progress the overall progress, with {@code 1.0} meaning fully complete
@return the progress bar line
jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/logging/ProgressDisplayGenerator.java