chia7712 commented on code in PR #17340:
URL: https://github.com/apache/kafka/pull/17340#discussion_r1890058353
##########
tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java:
##########
@@ -94,7 +98,18 @@ 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) {
+ if (i < config.warmupRecords) {
+ cb = new PerfCallback(sendStartMs, payload.length,
stats);
+ } else {
+ if (i == config.warmupRecords) {
+ steadyStateStats = new Stats(config.numRecords -
config.warmupRecords, DEFAULT_REPORTING_INTERVAL_MS, config.warmupRecords > 0);
Review Comment:
Apologies for the unclear description. I have attached a screenshot to
illustrate the warning from the IDE.

we can make IDE happy by a little change :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]