Can JProfiler be used for profiling Grails application. What is the best tool to profile Grails app

154 views
Skip to first unread message

clr meno

unread,
Mar 23, 2017, 6:17:17 AM3/23/17
to Grails Dev Discuss
Is JProfiler the right choice for profiling Grails application. I want to profile my Grails application to understand the performance hotspots so that I could make code changes accordingly.

Mihai Glonț

unread,
Mar 23, 2017, 7:40:47 AM3/23/17
to grails-de...@googlegroups.com

I'm happily using the YourKit profiler. -- Mihai.


On 23/03/2017 10:17, clr meno wrote:
Is JProfiler the right choice for profiling Grails application. I want to profile my Grails application to understand the performance hotspots so that I could make code changes accordingly.
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/d34dad0d-f400-4620-815e-5c36f0659922%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

clr meno

unread,
Mar 24, 2017, 12:32:27 AM3/24/17
to Grails Dev Discuss
Thanks.

clr meno

unread,
Mar 26, 2017, 7:28:22 PM3/26/17
to Grails Dev Discuss
@Mihai,
I am currently trying to profile a grails application using JProfiler.  
1) When I try to attach the profiler it asks for main class. Which class is the main class for grails? Did you face the same issue when you started profiling as with yourKit?
2) I also saw the option to attach to an existing running JVM in which case I could attach to the running local host server of grails application. But will it profile my whole application code? 
3) I was wondering if  there is a way to point to the src or grails-app folder and get the profiler to detect hotspots on all of the files
Really appreciate any inputs that you could provide
Thanks


On Thursday, March 23, 2017 at 6:17:17 AM UTC-4, clr meno wrote:

Jeff Brown

unread,
Mar 28, 2017, 2:39:18 AM3/28/17
to Grails Dev Discuss
I routinely use YourKit and really like it. The IntelliJ integration is
quite nice and it plays very well with Grails 3 apps.




JSB

--
Jeff Scott Brown
OCI Grails Practice Lead
Principal Software Engineer

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

Mihai Glonț

unread,
Mar 28, 2017, 5:07:20 AM3/28/17
to grails-de...@googlegroups.com

I can only rely on my experience with YourKit + its Intellij plugin to try to answer.

On 27/03/17 00:28, clr meno wrote:
@Mihai,
I am currently trying to profile a grails application using JProfiler.  
1) When I try to attach the profiler it asks for main class. Which class is the main class for grails? Did you face the same issue when you started profiling as with yourKit?
With Grails 3 there is a main class, but I can't think of an equivalent for Grails 2.


2) I also saw the option to attach to an existing running JVM in which case I could attach to the running local host server of grails application. But will it profile my whole application code?
This is what I normally do.
It doesn't matter if you're using jvisualvm's profiler, yourkit or anything else, the crux is to get the profiler on the agent path of the java process for your application.
And yes, it will profile your entire application (read any method in any class invoked by your application while you're profiling it), whether it's a web app or not. You can typically customise this either by saying ignore classes from packages A, B and C (blacklist), or only include com.Foo, com.bar.* (whitelist).


3) I was wondering if  there is a way to point to the src or grails-app folder and get the profiler to detect hotspots on all of the files
I'd launch the application with the profiler attached, then, as a user of the application, I'd play with the features which leverage the code you want to profile and monitor the information gathered by profiler.

Good luck!

Really appreciate any inputs that you could provide
Thanks


On Thursday, March 23, 2017 at 6:17:17 AM UTC-4, clr meno wrote:
Is JProfiler the right choice for profiling Grails application. I want to profile my Grails application to understand the performance hotspots so that I could make code changes accordingly.
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

oru...@beapi.io

unread,
Mar 28, 2017, 11:27:48 PM3/28/17
to Grails Dev Discuss
I actually build my own profiler tool into my api plugin so I can just change the way I call an endpoint and get out a list of class>functions and the time it took for each call. Naturally you have to add a snippet to all your controller methods where you want this but other than that, pretty useful.

clr meno

unread,
Apr 4, 2017, 11:10:08 AM4/4/17
to Grails Dev Discuss
Thanks a lot for the suggestions. I was able to use JProfiler for my application
Reply all
Reply to author
Forward
0 new messages