Note: I have changed the subject line to prefix using [rng] since this is not related to [GSoC] but to the [rng] component.

On 11/04/2019 08:15, Abhishek Dhadwal wrote:
Dear Sir,

I have applied for the Apache ICLA, and built the project using - mvn clean 
package

I have already used maven to build the project. Should I try running
benchmark tests on the SecureRandom algorithms as discussed ? If so, are
there any guidelines/ data on doing so ?
This is in module "commons-rng-examples/exmaples-jmh".
The site : 
https://commons.apache.org/proper/commons-rng/commons-rng-examples-jmh/apidocs/ 
gives a 404 error

The site is only built per release. The link will be fixed in the next release.

If you want to look at the Javadocs then you can build them locally from the commons-rng-examples/examples-jmh directory by running:

mvn javadoc:javadoc

The output will be in:

target/site/apidocs/index.html

Or you could read the code.

, and the user guide, as far as I recall, has not provided any information on 
testing.
Are there any reference sources/guides I can use for doing so ?

This mailing list is the best resource.

What do you intend to test?

There is now a summary in the package-info.java file stating how to update the benchmarks if you have added a generator to the enum RandomSource in the commons-simple module.

For a quick start if you want to test the performance of a new random generator then (assuming you have the implementation somewhere) you can look at the baseline benchmarks such as NextIntGenerationPerformance.

A simple test would be to add state to the benchmark class that creates your generator and a new @Benchmark method that runs it:

    private UniformRandomProvider rngToTest = constructSomehow();

    @Benchmark
    public int testRng() {
        return rngToTest.nextInt();
    }

For a quick comparison to other providers I would edit RandomSourceValues to remove most of the generators you are not interested in.


FYI.

A good place to start with benchmarking would be to run through all the tutorials in the JMH project:

https://openjdk.java.net/projects/code-tools/jmh/

Do this:

> hg clone http://hg.openjdk.java.net/code-tools/jmh/ jmh

> cd jmh

> hg up 1.21

> cd jmh-samples

Then start reading the benchmark sample tutorials in:

src/main/java/org/openjdk/jmh/samples/

E.g. to run the first one:

> mvn clean install

> java -jar target/benchmarks.jar JMHSample_01

I will leave it up to you to experiment with the JMH settings. I find it useful to reduce the length of the iterations to 1 second from the default of 10. See:

> java -jar target/benchmarks.jar -h


Alex


Regards,
Abhishek Singh Dhadwal


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to