Download Latest Version profiler.jar (92.7 kB)
Email in envelope

Get an email when there's a new version of JavaClassProfiler

Home
Name Modified Size InfoDownloads / Week
ReadMe 2016-12-06 2.1 kB
profiler.zip 2016-12-06 394.6 kB
profiler.jar 2016-12-06 92.7 kB
Totals: 3 Items   489.3 kB 0
This fully personal project has been made to ease the profiling of some java projects I was working on.
It mainly comes from a lot of informations and ideas I have had from internet. So to redistribute under LGPL it is the less thing I can do.

To use it :

from the java launch you have to add some arguments.
Arguments should be of the form <PortNumber>;package1;package2;package3...
For example : 12001:com.mycomp:org.mypackage.utils
Note that ':' is the argument separator for premain and agentmain values.

Complete syntax to add to the java launch :
	-javaagent:<AbsolutePath of the profiler jar>=<port>;<package1>;<package2>...
	
Port is the port number where you will have to connect your client.
Package1, Package2 and so on are package that you want to profile.

Assuming you have an application with some specific packages like com.onecompany.oneapp
and that this package has 2 sub packages services and algo, you can profile every class of the app, 
or only one of the 2 packages. 
 
 To profile all the classes :
 	-javaagent:c:\JavaClassProfile\target\profiler.jar=12000;com.onecompany.oneapp
 	
 To profile only the package services :
 	-javaagent:c:\JavaClassProfile\target\profiler.jar=12000;com.onecompany.oneapp.services
 	
 To profile the package algo and the two libs it uses :
 	-javaagent:c:\JavaClassProfile\target\profiler.jar=12000;com.onecompany.oneapp.algo;com.package.lib1;com.package.lib2
 	
 
 
 You do not have to indicate the profiler jar into the class path of your java call since you already mention it into the javaagent argument.
 
 
 Once this is done, you can launch the profiler UI client using the class org.xneb.profiler.ui.ProfilerClient
 
 java -cp c:\JavaClassProfile\target\profiler.jar org.xneb.profiler.ui.ProfilerClient
 
 
 Press Profiler and connect 
 then enter the name of your machine running your jvm to profile and the port you register in the javaagent argument. 
 
 Click on refresh to retrieve the last measures.
 
 You're done !!!
 
 Happy profiling.
 
 
 		
Source: ReadMe, updated 2016-12-06