private void incrementNumDocsProcessed(Processing processing) {
        List<DocumentOperation> operations = ((ProcessingAccess)processing).getOnceOperationsToBeProcessed();
        if ( ! operations.isEmpty()) {
            metric.add(docCounterName, operations.size(), null);
            operations.stream()
                      .collect(groupingBy(operation -> operation.getId().getDocType(), counting()))
                      .forEach((type, count) -> metric.add(METRIC_NAME_DOCUMENTS_PROCESSED, count, contexts.apply(type)));
        }
    }
Creates a new named DocprocExecutor, with the same instance variables as the given executor,
but a new call stack.

@param oldExecutor the executor to inherit the instance variables from, sans call stack.
@param callStack the call stack to use.
docproc/src/main/java/com/yahoo/docproc/impl/DocprocExecutor.java