@Override
  public void accept(ProgressEvent progressEvent) {
    Allocation allocation = progressEvent.getAllocation();
    long progressUnits = progressEvent.getUnits();
    double allocationFraction = allocation.getFractionOfRoot();

    if (progressUnits != 0) {
      progress.add(progressUnits * allocationFraction);
    }

    if (completionTracker.updateProgress(allocation, progressUnits)) {
      // Note: Could produce false positives.
      updateNotifier.accept(new Update(progress.sum(), completionTracker.getUnfinishedLeafTasks()));
    }
  }
A callback to notify that {@link #progress} or {@link #completionTracker} could have changed.
Note that every change will be reported (though multiple could be reported together), and there
could be false positives.
jib-core/src/main/java/com/google/cloud/tools/jib/event/progress/ProgressEventHandler.java