chia7712 commented on code in PR #17340: URL: https://github.com/apache/kafka/pull/17340#discussion_r1827069422
########## tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java: ########## @@ -75,7 +76,13 @@ void start(String[] args) throws IOException { // not thread-safe, do not share with other threads SplittableRandom random = new SplittableRandom(0); ProducerRecord<byte[], byte[]> record; - stats = new Stats(config.numRecords, 5000); + if (config.warmupRecords > 0) { + // TODO: Keep this message? Maybe unnecessary Review Comment: yes, please the unnecessary log ########## tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java: ########## @@ -114,6 +133,10 @@ record = new ProducerRecord<>(config.topicName, payload); if (!config.shouldPrintMetrics) { producer.close(); + /* print warmup stats if relevant */ + if (warmupStats != null) { + new Stats(warmupStats, stats).printTotal(); Review Comment: Maybe we should have a state for 'all' and another state for 'steady-only'. With this approach, we can avoid this kind of magic merging. -- 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