Skip to content

Commit dc93d94

Browse files
authored
fix(benchmark): fix compression so it works even when not batching (#3029)
Signed-off-by: Robin Han <hanxvdovehx@gmail.com>
1 parent 434ec66 commit dc93d94

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

tools/src/main/java/org/apache/kafka/tools/automq/PerfCommand.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,10 @@ private List<byte[]> randomPayloads(int size, double randomRatio, int count) {
309309
int randomBytes = (int) (size * randomRatio);
310310
int staticBytes = size - randomBytes;
311311
byte[] staticPayload = new byte[staticBytes];
312-
r.nextBytes(staticPayload);
313-
314312
if (randomBytes == 0) {
315313
// all payloads are the same, no need to create multiple copies
316314
return List.of(staticPayload);
317315
}
318-
319316
List<byte[]> payloads = new ArrayList<>(count);
320317
for (int i = 0; i < count; i++) {
321318
byte[] payload = new byte[size];

0 commit comments

Comments
 (0)