private List<byte[]> randomPayloads(int size, double randomRatio, int count) {
        Random r = ThreadLocalRandom.current();

        int randomBytes = (int) (size * randomRatio);
        int staticBytes = size - randomBytes;
        byte[] staticPayload = new byte[staticBytes];
        r.nextBytes(staticPayload);

        if (randomBytes == 0) {
            // all payloads are the same, no need to create multiple copies
            return List.of(staticPayload);
        }

        List<byte[]> payloads = new ArrayList<>(count);
        for (int i = 0; i < count; i++) {
            byte[] payload = new byte[size];
            r.nextBytes(payload);
            System.arraycopy(staticPayload, 0, payload, randomBytes, staticBytes);
            payloads.add(payload);
        }
        return payloads;
    }
Generates a list of byte arrays with specified size and mix of random and static content.

@param size        The size of each byte array.
@param randomRatio The fraction of each array that should be random (0.0 to 1.0).
@param count       The number of arrays to generate.
@return List of byte arrays, each containing a mix of random and static bytes.
tools/src/main/java/org/apache/kafka/tools/automq/PerfCommand.java