Partial RE for Benchmark Tests
Bernd Eckenfels
ecki at zusammenkunft.net
Mon Aug 11 22:45:45 UTC 2014
JMH uses a regular expression to select the Benchmarks. While doing so
(as I understand it) it reuqires a full match. This has the
"disadvantage" that you always need to specify ".*MyBenchmark.*". Not
everybody is used to this syntax and it is really seldomly needed.
How about changing this to a partial match with ^$ support: if you
specify an expression and it is found inside the benchmark name, the
benchmark will be selected. That way you can even specify Substrings
and be done 99% of the time: MyBenchmark. If you need to be more
speficic, you could: "^.*MyBenchmark\.[^.]+"
Is it worth coming up with a patch for it?
Bernd
More information about the jmh-dev
mailing list