how to regular expression match benchmark's name if the name has "$" in it

Henri Tremblay henri.tremblay at gmail.com
Tue Mar 7 02:40:35 UTC 2017


The name of the method should be the name of the method you have coded.

How can you find a method "accidentally"? Are we talking about the methods
generated my JMH after compilation?

Anyhow, those regex should match:
findAllIn.*
findAllIn.*100
findAllIn\$chars\$100\$1k


On 6 March 2017 at 15:12, Bo Zhang <bo.zh.zhang at oracle.com> wrote:

> Hi there,
>
> I am using JMH to run benchmarks. I accidentally find a benchmark method,
> whose name is "findAllIn$chars$100$1k".
>
> In this case, how can I use regex to match this name in my "java -jar
> ./test/benchmark.jar  <regex match>" command?
>
> Thanks,
> Bo
>


More information about the jmh-dev mailing list