I did a test and found the overhead of a function call to System.nanoTime() is at least 500 ns on my machine.
Seemed that it is very hard to have a high performance java
profiler.
For enterprise software, suppose a function takes about 350 seconds and has 12,500,000,000 times of method calls. Therefore, the number of calls to
…