private void addSummary(final String title,
                            final StringBuilder sb,
                            final boolean showPhaseDetail,
                            final QueueProcessTasksState queueProcessTasksState) {
        synchronized (filterProgressMonitorList) {
            sb.append(title);
            sb.append("\n");
            sb.append("---\n");
            sb.append("Inspected ");
            sb.append(filterProgressMonitorList.size());
            sb.append("/");
            sb.append(totalFilterCount);
            sb.append(" filters");
            sb.append("\n");
            sb.append("Total time: ");
            sb.append(totalDuration.get());
            sb.append("\n");
            if (queueProcessTasksState != null) {
                queueProcessTasksState.report(sb);
            } else {
                final AtomicInteger initialCount = new AtomicInteger();
                final AtomicInteger added = new AtomicInteger();
                filterProgressMonitorList.forEach(filterProgressMonitor -> {
                    initialCount.addAndGet(filterProgressMonitor.initialCount);
                    added.addAndGet(filterProgressMonitor.added.get());
                });
                sb.append("Initial: ");
                sb.append(initialCount.get());
                sb.append("\n");
                sb.append("Added: ");
                sb.append(added.get());
                sb.append("\n");
                sb.append("Final: ");
                sb.append(initialCount.get() + added.get());
            }

            // Only show phase detail in trace log.
            if (showPhaseDetail) {
                final Map<Phase, PhaseDetails> combinedPhaseDetailsMap = new HashMap<>();
                for (final FilterProgressMonitor filterProgressMonitor : filterProgressMonitorList) {
                    for (final Entry<Phase, PhaseDetails> entry : filterProgressMonitor.phaseDetailsMap.entrySet()) {
                        final Phase phase = entry.getKey();
                        final PhaseDetails filterPhaseDetails = entry.getValue();

                        combinedPhaseDetailsMap
                                .computeIfAbsent(phase, k -> new PhaseDetails(phase))
                                .add(filterPhaseDetails);
                    }
                }
                appendPhaseDetails(sb, combinedPhaseDetailsMap.values());
            }
        }
    }
Holds state relating to the progress of creation of tasks by the master node
stroom-processor/stroom-processor-impl/src/main/java/stroom/processor/impl/ProgressMonitor.java