hollow/src/main/java/com/netflix/hollow/api/producer/metrics/AbstractProducerMetricsListener.java
@Override
    public void onCycleComplete(com.netflix.hollow.api.producer.Status status, HollowProducer.ReadState readState, long version, Duration elapsed) {
        boolean isCycleSuccess;
        long cycleEndTimeNano = System.nanoTime();

        if (status.getType() == com.netflix.hollow.api.producer.Status.StatusType.SUCCESS) {
            isCycleSuccess = true;
            consecutiveFailures = 0l;
            lastCycleSuccessTimeNanoOptional = OptionalLong.of(cycleEndTimeNano);
        } else {
            isCycleSuccess = false;
            consecutiveFailures ++;
        }

        cycleMetricsBuilder
                .setConsecutiveFailures(consecutiveFailures)
                .setCycleDurationMillis(elapsed.toMillis())
                .setIsCycleSuccess(isCycleSuccess);

        lastCycleSuccessTimeNanoOptional.ifPresent(cycleMetricsBuilder::setLastCycleSuccessTimeNano);

        cycleMetricsReporting(cycleMetricsBuilder.build());
    }
@Override
    public void onCycleComplete(com.netflix.hollow.api.producer.Status status, HollowProducer.ReadState readState, long version, Duration elapsed) {
        boolean isCycleSuccess;
        long cycleEndTimeNano = System.nanoTime();

        if (status.getType() == com.netflix.hollow.api.producer.Status.StatusType.SUCCESS) {
            isCycleSuccess = true;
            consecutiveFailures = 0l;
            lastCycleSuccessTimeNanoOptional = OptionalLong.of(cycleEndTimeNano);
        } else {
            isCycleSuccess = false;
            consecutiveFailures ++;
        }

        cycleMetricsBuilder
                .setConsecutiveFailures(consecutiveFailures)
                .setCycleDurationMillis(elapsed.toMillis())
                .setIsCycleSuccess(isCycleSuccess);

        lastCycleSuccessTimeNanoOptional.ifPresent(cycleMetricsBuilder::setLastCycleSuccessTimeNano);

        cycleMetricsReporting(cycleMetricsBuilder.build());
    }
On cycle completion this method reports cycle metrics.
@param status Whether the cycle succeeded or failed
@param readState Hollow data state published by cycle, not used here because data size is known from when announcement completed
@param version Version of data that was published in this cycle
@param elapsed Cycle start to end duration