Is there any JVM parameter or configuration to print how much time taken by each thread in Java?
It’s not possible for me to go in each Servlet and get start/end time of method execution and then print difference.
Please suggest me any good idea which can be implemented once and reflect in all over the application.
If you want to trace your threads activity using JVM command line you can use
-Xrunhprof.For example :
Then take a look at the file
dump.hprof, it’s a bit hard to read but you can obtain accurate informations.Also see :
If you need the list of all the options.
Hope it can help.