Question

I want to profile some slow running legacy test cases. Can I do it with JProfiler? If yes, how do I connect the java process started from ant to Jprofiler?

Was it helpful?

Solution

In JProfiler, invoke

Session->Integration wizards->New remote integration

and follow the steps in the wizard. In the "Startup mode" step, select the "Profile offline option".

Use the VM parameters given by the wizard and add it to the java invocation in the ant build file.

In the JProfiler session created by the wizard, add triggers for "JVM startup" and "JVM exit". The startup trigger should contain an action that starts recording and the exit trigger an action that saves a snapshot to disk.

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