JMH error Annotation generator had thrown the exception. java.lang.ClassCastException
Vipin Sharma
vipinsharma85 at gmail.com
Tue Mar 3 03:59:11 UTC 2020
Thanks for explaining, it was my mistake.
Regards,
Vipin
On Tue, Mar 3, 2020 at 3:15 AM R H <ralf at pkmd.de> wrote:
> Not sure if this is cleared up yet.
>
> On 02.03.2020 20:05, Vipin Sharma wrote:
>
> > @Benchmark
> > public double test() {
> > return 0;
> > }
>
> This is a suitable method for a benchmark: No arguments.
>
> > @Benchmark
> > public static <E extends Enum<E>> EnumSet<E> testEnumSet(E param) {
> > return null;
> > }
> > }
>
> This one is static, and it needs an argument to be called. Like Alexej
> said, it is hard for JMH to know what argument you want to call the
> method with. Better wrap this call in a suitable benchmark method that
> takes no argument.
>
> viel Spaß!
>
More information about the jmh-dev
mailing list