private void update(PeriodResult periodResult, double elapsedTotal) {
            this.timeSecs.add(elapsedTotal);
            this.produceRate.add(periodResult.produceRate);
            this.produceThroughputBps.add(periodResult.produceThroughputBps);
            this.errorRate.add(periodResult.errorRate);
            this.consumeRate.add(periodResult.consumeRate);
            this.consumeThroughputBps.add(periodResult.consumeThroughputBps);
            this.backlog.add(periodResult.backlog);
            this.produceLatencyMeanMicros.add(periodResult.produceLatencyMeanMicros);
            this.produceLatencyMinMicros.add(periodResult.produceLatencyMinMicros);
            this.produceLatency50thMicros.add(periodResult.produceLatency50thMicros);
            this.produceLatency75thMicros.add(periodResult.produceLatency75thMicros);
            this.produceLatency90thMicros.add(periodResult.produceLatency90thMicros);
            this.produceLatency95thMicros.add(periodResult.produceLatency95thMicros);
            this.produceLatency99thMicros.add(periodResult.produceLatency99thMicros);
            this.produceLatency999thMicros.add(periodResult.produceLatency999thMicros);
            this.produceLatency9999thMicros.add(periodResult.produceLatency9999thMicros);
            this.produceLatencyMaxMicros.add(periodResult.produceLatencyMaxMicros);
            this.endToEndLatencyMeanMicros.add(periodResult.endToEndLatencyMeanMicros);
            this.endToEndLatencyMinMicros.add(periodResult.endToEndLatencyMinMicros);
            this.endToEndLatency50thMicros.add(periodResult.endToEndLatency50thMicros);
            this.endToEndLatency75thMicros.add(periodResult.endToEndLatency75thMicros);
            this.endToEndLatency90thMicros.add(periodResult.endToEndLatency90thMicros);
            this.endToEndLatency95thMicros.add(periodResult.endToEndLatency95thMicros);
            this.endToEndLatency99thMicros.add(periodResult.endToEndLatency99thMicros);
            this.endToEndLatency999thMicros.add(periodResult.endToEndLatency999thMicros);
            this.endToEndLatency9999thMicros.add(periodResult.endToEndLatency9999thMicros);
            this.endToEndLatencyMaxMicros.add(periodResult.endToEndLatencyMaxMicros);
        }
Check if the loop in {@link StatsCollector#printAndCollectStats} should stop.

@param startNanos start time in nanoseconds
@param nowNanos   current time in nanoseconds
@return true if the loop should stop
tools/src/main/java/org/apache/kafka/tools/automq/perf/StatsCollector.java