![]() | ![]() |
|
ProfilerJ in a nutshell
Content of distributionThe distribution of profilerJ (i.e. profilerJ...zip,profilerJ...gz or profilerJ-1.4.0.msi ) consists of the following files:
InstallationWindowsStart profilerJ-1.4.1.msi and follow instructions. Other platforms
Expand the archive profilerJ-1.4.1.zip (.gz, .tar respectively) to a directory of your choice (e.g.
/var/opt/profilerj).
Deployment
Add the following statements to the startup-script of the java application you want to profile:
Alternatively, you can store your command-line arguments into a property file. This is extremely useful, when the command-line gets bloated: java -Xbootclasspath/a:"...\com.terrasoft.jrc.agent.jar" -javaagent:"... \com.terrasoft.jrc.agent.jar=properties=profilerj.cfg" -cp foo.jar com.terrasoft.foo where profilerj.cfg is a file containing command line arguments. To automatically write code coverage metrics when the application exits, the file profilerj.cfg would contain something like shown below:
Take a look at agent.suspend. You probably have noticed, that this option - when defined in the command line - doesn't have the prefix "agent.". To keep the command line small, ProfilerJ adds a "agent." to every option which doesn't contain a dot (".").
To activate JMX support, you will have to add -Dcom.sun.management.jmxremote to the command line.
ProfilerJ-ConsoleHow to create snapshotsRun profilerjCMD.cmd or (profilerjCMD.sh respectively). To gather profiling information by sampling, switch on the sampler: > sampler on To resume a suspended application, type "resume" (or any valid abbreviation i.e. re[sume]): > resume Create a snapshot by typing sna[pshot]: > sna
ProfilerJ-ViewerSee tutorial to find out how to use ProfilerJ-viewer. |