Skip to content

Commit cfa7321

Browse files
committed
Test higher message size
1 parent e62aee1 commit cfa7321

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

ci/tests/run_perf_test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ async function main() {
4747
if (concurrentRun) {
4848
skipCtpTest = true;
4949
}
50+
if (!process.env.CONSUMER_MAX_BATCH_SIZE) {
51+
process.env.CONSUMER_MAX_BATCH_SIZE = '-1';
52+
}
5053
const consumerMode = process.env.CONSUMER_MODE || 'all';
5154
const produceToSecondTopic = process.env.PRODUCE_TO_SECOND_TOPIC ? process.env.PRODUCE_TO_SECOND_TOPIC === 'true' : false;
5255
const produceToSecondTopicParam = produceToSecondTopic ? '--produce-to-second-topic' : '';

examples/performance/performance-consolidated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const saslPassword = process.env.SASL_PASSWORD;
2020
const topic = process.env.KAFKA_TOPIC || 'test-topic';
2121
const topic2 = process.env.KAFKA_TOPIC2 || 'test-topic2';
2222
const messageCount = process.env.MESSAGE_COUNT ? +process.env.MESSAGE_COUNT : 1000000;
23-
const messageSize = process.env.MESSAGE_SIZE ? +process.env.MESSAGE_SIZE : 256;
24-
const batchSize = process.env.BATCH_SIZE ? +process.env.BATCH_SIZE : 100;
23+
const messageSize = process.env.MESSAGE_SIZE ? +process.env.MESSAGE_SIZE : 4096;
24+
const batchSize = process.env.PRODUCER_BATCH_SIZE ? +process.env.PRODUCER_BATCH_SIZE : 100;
2525
const compression = process.env.COMPRESSION || 'None';
2626
// Between 0 and 1, percentage of random bytes in each message
2727
const randomness = process.env.RANDOMNESS ? +process.env.RANDOMNESS : 0.5;

examples/performance/performance-primitives.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
};
2121

2222

23-
const MAX_BATCH_SIZE = process.env.MAX_BATCH_SIZE ? +process.env.MAX_BATCH_SIZE : null;
23+
const CONSUMER_MAX_BATCH_SIZE = process.env.CONSUMER_MAX_BATCH_SIZE ? +process.env.CONSUMER_MAX_BATCH_SIZE : null;
2424

2525
function baseConfiguration(parameters) {
2626
let ret = {
@@ -150,8 +150,8 @@ function newCompatibleConsumer(parameters, eachBatch) {
150150
{ 'enable.auto.commit': true, 'auto.commit.interval.ms': autoCommit } :
151151
{ 'enable.auto.commit': false };
152152
const jsOpts = {};
153-
if (eachBatch && MAX_BATCH_SIZE !== null) {
154-
jsOpts['js.max.batch.size'] = MAX_BATCH_SIZE;
153+
if (eachBatch && CONSUMER_MAX_BATCH_SIZE !== null) {
154+
jsOpts['js.max.batch.size'] = CONSUMER_MAX_BATCH_SIZE;
155155
}
156156

157157
let groupId = eachBatch ? process.env.GROUPID_BATCH : process.env.GROUPID_MESSAGE;

0 commit comments

Comments
 (0)