Fwd: @Param support for enum

Martin Grajcar maaartinus at gmail.com
Sat Jun 14 15:44:56 UTC 2014


Hi!

FWIW parameterless @Param annotations are what I always to use with
Caliper. Ideally, I pack the variants into an enum and use some booleans,
too. Then I get something like

@Param
private MemoizationType memoizationType;
 @Param
private boolean prefixed;

with no need to repeat the values (and no chance of forgetting to update
the list when something changes!). See [1] for a complete example.

Would you say that I'm doing something strange?

[1]:
https://dl.dropboxusercontent.com/u/4971686/published/maaartin/lombok/CachedHashCodeBenchmark.java

PS: Joe: Sorry for the previous email, it was meant to go to the list.


More information about the jmh-dev mailing list