void dump(Reindexing reindexing) {
        reindexing.status().forEach((type, status) -> {
            metric.set(ClusterControllerMetrics.REINDEXING_PROGRESS.baseName(),
                       status.progress().map(ProgressToken::percentFinished).map(percentage -> percentage * 1e-2)
                             .orElse(status.state() == SUCCESSFUL ? 1.0 : 0.0),
                       metric.createContext(Map.of("clusterid", cluster, "documenttype", type.getName())));
        });
    }
Metrics for reindexing in a content cluster.

@author jonmv
clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingMetrics.java