Browse Source
Why: Using java.util.Random to generate every byte sent from the ProducerPerformance appears to be a limiting factor. Throughput of the ProducerPerformance script is higher with a file of records as compared to randomly generated records. On my machine a single thread can generate ~100MB/second of uppercase letters using java.util.Random and ~300MB/sec using java.util.SplittableRandom. This is a limit on throughput. Note: you can optimise further by expanding it from 26 letters to 32 letter generated as it is more efficient to generate a nicely distributed int when the bound is a power of two. Reviewers: Luke Chen <showuon@gmail.com>pull/13483/head
Robert Young
2 years ago
committed by
GitHub
2 changed files with 8 additions and 7 deletions
Loading…
Reference in new issue