On Thu, 10 Aug 2023 11:13:12 GMT, Raffaello Giulietti <[email protected]> wrote:
> AFAIK, if you need reproducible randoms in tests, you should add the tags: > > ``` > * @key randomness > * @library /test/lib > ``` > > and initialize your random generator with > > ``` > import jdk.test.lib.RandomFactory; > ... > Random rnd = RandomFactory.getRandom(); > ``` > > This prints the seed to STDOUT. It'd be applicable for tests, but not for benchmarks. Also, the point that @cl4es seems to make is that randomness is captured and set up to reduce noise, not to be able to reproduce "benchmark failures". ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14630#discussion_r1289976177
