Reporting Internal Functions

Bernd ecki at zusammenkunft.net
Sat Aug 23 14:21:22 UTC 2014


Hello,

I guess the obvious thing is to put a @Benchmark on g() and h(). ;)

But I think what you are asking for is one of the profilers. I suspect they
will either be inaccurate or affect your result, so it is better to try to
measure the code segments you care about seperate (but this has its own
issues as they might get differently optimized and inlined).

Gruss
Bernd
Am 23.08.2014 14:15 schrieb "Volkan YAZICI" <volkan.yazici at gmail.com>:

> Hi,
>
> I have a function as follows.
>
>     @Benchmark
>     void f() {
>         g(h());
>     }
>
> Put another way, f() is an entry point for g() and h(). Is it possible to
> make JMH to measure the performance of g() and h() individually?
>
> Best.
>


More information about the jmh-dev mailing list