public synchronized void onTargetChunkFinished(BuildTargetChunk chunk, CompileContext context) {
    boolean successful = !Utils.errorsDetected(context) && !context.getCancelStatus().isCanceled();
    long nonDummyTargetsCount = chunk.getTargets().stream().filter(it -> !myTargetIndex.isDummy(it)).count();
    for (BuildTarget<?> target : chunk.getTargets()) {
      myCurrentProgress.remove(target);
      if (!myTargetIndex.isDummy(target)) {
        BuildTargetType<?> targetType = target.getTargetType();
        //myNumberOfFinishedTargets.addTo(targetType, 1);
        myExpectedTimeForFinishedTargets += myExpectedBuildTimeForTarget.getLong(targetType);

        long elapsedTime = myFreezeDetector.getAdjustedDuration(context.getCompilationStartStamp(target), System.currentTimeMillis());
        myAbsoluteBuildTime += elapsedTime;
        
        if (successful && FSOperations.isMarkedDirty(context, target)) {
          long buildTime = elapsedTime / nonDummyTargetsCount;
          myTotalBuildTimeForFullyRebuiltTargets.addTo(targetType, buildTime);
          myNumberOfFullyRebuiltTargets.addTo(targetType, 1);
        }
      }
    }
    notifyAboutTotalProgress(context);
  }
public synchronized void onTargetChunkFinished(BuildTargetChunk chunk, CompileContext context)