private void resetForNewPeriod() {
        startOfPeriodNanos = endOfPeriodNanos;
        cumulativeLoadNanos = 0.0;
        cumulativeLoadNanosByThread.clear();
        cumulativeLatency = Duration.ZERO;
        maxLatency = Duration.ZERO;
        numIntervalsStarted = 0;
        numIntervalsEnded = 0;
        maxLoad = activeIntervals.size();
    }
Returns the metrics for the current time period up to now, and starts a new period.
zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LatencyStats.java