Skip to content

Commit 6979e92

Browse files
committed
Log average and max size
1 parent 1735d04 commit 6979e92

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

ci/tests/run_perf_test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const consumerConfluentBatchMaxLatency = extractValue(outputConfluentProducerCon
7272
const consumerConfluentBatchTime = extractValue(outputConfluentProducerConsumer, '=== Consumption time (eachBatch):');
7373
const consumerConfluentBatchAverageLag = extractValue(outputConfluentProducerConsumer, '=== Average eachBatch lag:');
7474
const consumerConfluentBatchMaxLag = extractValue(outputConfluentProducerConsumer, '=== Max eachBatch lag:');
75+
const consumerConfluentBatchAverageSize = extractValue(outputConfluentProducerConsumer, '=== Average eachBatch size:');
7576
const consumerConfluentAverageRSS = extractValue(outputConfluentProducerConsumer, '=== Max Average RSS across tests:');
7677
const consumerConfluentMaxRSS = extractValue(outputConfluentProducerConsumer, '=== Max RSS across tests:');
7778
if (!skipCtpTest) {
@@ -92,6 +93,7 @@ const consumerKjsBatchMaxLatency = extractValue(outputKjsProducerConsumer, '===
9293
const consumerKjsBatchTime = extractValue(outputKjsProducerConsumer, '=== Consumption time (eachBatch):');
9394
const consumerKjsBatchAverageLag = extractValue(outputKjsProducerConsumer, '=== Average eachBatch lag:');
9495
const consumerKjsBatchMaxLag = extractValue(outputKjsProducerConsumer, '=== Max eachBatch lag:');
96+
const consumerKjsBatchAverageSize = extractValue(outputKjsProducerConsumer, '=== Average eachBatch size:');
9597
const consumerKjsAverageRSS = extractValue(outputKjsProducerConsumer, '=== Max Average RSS across tests:');
9698
const consumerKjsMaxRSS = extractValue(outputKjsProducerConsumer, '=== Max RSS across tests:');
9799
if (!skipCtpTest) {
@@ -112,6 +114,7 @@ console.log(`Consumer max E2E latency (eachBatch): confluent ${consumerConfluent
112114
console.log(`Consumption time (eachBatch): confluent ${consumerConfluentBatchTime}, kafkajs ${consumerKjsBatchTime}`);
113115
console.log(`Average eachBatch lag: confluent ${consumerConfluentBatchAverageLag}, kafkajs ${consumerKjsBatchAverageLag}`);
114116
console.log(`Max eachBatch lag: confluent ${consumerConfluentBatchMaxLag}, kafkajs ${consumerKjsBatchMaxLag}`);
117+
console.log(`Average eachBatch size: confluent ${consumerConfluentBatchAverageSize}, kafkajs ${consumerKjsBatchAverageSize}`);
115118
console.log(`Average RSS: confluent ${consumerConfluentAverageRSS}, kafkajs ${consumerKjsAverageRSS}`);
116119
console.log(`Max RSS: confluent ${consumerConfluentMaxRSS}, kafkajs ${consumerKjsMaxRSS}`);
117120
if (!skipCtpTest) {

examples/performance/performance-primitives-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function runConsumer(consumer, topic, warmupMessages, totalMessageCnt, eac
2323
const sentAt = Number(decoder.decode(message.value.slice(0, 13)));
2424
const latency = receivedAt - sentAt;
2525

26-
if (stats.maxLatency === undefined) {
26+
if (!stats.maxLatency) {
2727
stats.maxLatency = latency;
2828
stats.avgLatency = latency;
2929
} else {

examples/performance/performance-primitives-kafkajs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async function runProducer(parameters, topic, batchSize, warmupMessages, totalMe
7070
let staticValueLength = Math.floor(msgSize * (1 - randomness));
7171
if (staticValueLength < 13)
7272
staticValueLength = 13;
73-
const staticValueRemainder = staticValueLength - 13;
73+
let staticValueRemainder = staticValueLength - 13;
7474
if (staticValueRemainder > 0) {
7575
staticValueRemainder = randomBytes(staticValueRemainder);
7676
} else {

examples/performance/performance-primitives.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async function runProducer(parameters, topic, batchSize, warmupMessages, totalMe
6969
let staticValueLength = Math.floor(msgSize * (1 - randomness));
7070
if (staticValueLength < 13)
7171
staticValueLength = 13;
72-
const staticValueRemainder = staticValueLength - 13;
72+
let staticValueRemainder = staticValueLength - 13;
7373
if (staticValueRemainder > 0) {
7474
staticValueRemainder = randomBytes(staticValueRemainder);
7575
} else {

0 commit comments

Comments
 (0)