code: public static void printProgressInfo(int counter, int size, int step, ProgressInfoMode mode, String text) {
          if (size < step) {
              return;
          }
  
          if (counter % (size / step) == 0) {
              double progressPercent = counter * 100 / size;
              progressPercent = 1 + Math.round(progressPercent * 100) / 100.0;
              if (mode.equals(ApiUtilities.ProgressInfoMode.TEXT)) {
                  logger.info(text + ": " + progressPercent + " - " + OS.getUsedMemory() + " MB");
              }
              else if (mode.equals(ApiUtilities.ProgressInfoMode.DOTS)) {
                  System.out.print(".");
                  if (progressPercent >= 100) {
                      System.out.println();
                  }
              }
          }
      }
docs: Prints a progress counter.
  @param counter Indicates the position in the task.
  @param size Size of the overall task.
  @param step How many parts should the progress counter have?
  @param mode Sets the output mode.
  @param text The text that should be print along with the progress indicator.