how to regular expression match benchmark's name if the name has "$" in it
Henri Tremblay
henri.tremblay at gmail.com
Tue Mar 7 17:54:21 UTC 2017
Fun.
findAllIn\$chars\$100\$1k does work. However, you need to put it into
quotes 'findAllIn\$chars\$100\$1k' on a Linux shell. I should have
mentioned that.
On 7 March 2017 at 10:48, Bo Zhang <bo.zh.zhang at oracle.com> wrote:
> Hi Henri,
>
> To clarify, by saying "accidentally", I mean I searched benchmarks from
> Github repository and apply them to analyze the performance of my hardware.
> I happened to find one repository using "$" in its name, which I believe is
> not a good idea and it indeed brought me trouble on regex match.
>
> I tried
>
> findAllIn\$chars\$100\$1k
>
> before I asked you. It does not work.
>
> findAllIn.*100.*1k works.
>
> Thanks a lot for help.
>
> Best regards,
>
> Bo
>
>
>
> On 3/6/2017 8:40 PM, Henri Tremblay wrote:
>
> 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