Question

I am not sure if this is the proper platform for this type of question.

I am working on a Java web application which use JPA(with play framwork) in backend and frontend html, jquery. For some requests the system is taking more than required time, some requests are taking more than 20 sec.

My question is, is there a tool or a way to identify the requests/thread which are taking more than a specified amount of time.

Thank you.

EDIT : I was looking for a tool which can be used long term in production server not an eclipse profiler.

Was it helpful?

Solution

I have used SIMON in similar kind of situation. Edit: Yes, it does have a nice web console

OTHER TIPS

For measuring the performance of any request on a Java Web app, you may use a filter, like on this example:

http://blog.actuanceconsulting.com/servlet-filter-java-performance-logging/

For measuring the performance of any method, you may use System.currentTimeMillis embedded on the method, but it would be better if you use an aspect, to decouple time measures from business code. Also, you can remove it and add it by configuration. For more information, take a look at this:

http://docs.spring.io/spring/docs/4.0.x/spring-framework-reference/html/aop.html

In case the database connection is the cause, you may set a timeout on the connection.

I would also suggest you to take a look at perf4j:

http://perf4j.codehaus.org/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top