Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

aws-blog-kinesis-producer-library: generateClickEvent data misleading to performance #63

Open
tflinz opened this issue Oct 7, 2016 · 0 comments

Comments

@tflinz
Copy link

tflinz commented Oct 7, 2016

In the aws-blog-kinesis-producer-library click events are generated with the following code:

private static ClickEvent generateClickEvent() {
    byte[] id = new byte[13];
    RANDOM.nextBytes(id);
    String data = StringUtils.repeat("a", 350);
    return new ClickEvent(DatatypeConverter.printBase64Binary(id), data);
}

However, the bulk of the content is just the letter "a", which means that the data sent up to the servers will be extremely compressable. (ie. the uploaded compressed payloads will essentially be the 13 byte random number plus a few more bytes).

It would be more representative of performance, to make a larger percentage of the event payload random.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant