matt-welch commented on code in PR #17340:
URL: https://github.com/apache/kafka/pull/17340#discussion_r2116785063


##########
tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java:
##########
@@ -94,7 +98,11 @@ void start(String[] args) throws IOException {
                 record = new ProducerRecord<>(config.topicName, payload);
 
                 long sendStartMs = System.currentTimeMillis();
-                cb = new PerfCallback(sendStartMs, payload.length, stats);
+                if ( config.warmupRecords > 0 && i == config.warmupRecords ) {
+                    steadyStateStats = new Stats(config.numRecords - 
config.warmupRecords, config.warmupRecords > 0);
+                    stats.steadyStateActive = true;

Review Comment:
   I like this because it makes the switchover process much more clear! Since 
the warmup stats object continues to accumulate data during the remainder of 
the test, but disables only its own printing, I named the variable 
suppressPrint and added a method for disabling printing of the warmup stats 
once we've switched to steady state.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to