ShiftOne

Java Runtime Analysis Toolkit

downloadforumwikisf.netapisvnlicense

JRat Quick Start Guide

If you are aren't using Java 5 yet, refer to these instructions.

This document intends to be a first time walk through for developers new to JRat.

1. Let JRat Watch Your Program Run

If you're program runs in Java 5 or above, then this step is extremely easy. You simply need to add a single argument to the java command that launches your program.

java -javaagent:shiftone-jrat.jar [your java ops] [main class]

You now want to excersize your program's functionality as much as possible so JRat can watch what happens and collect statistics. The more times you run your code, the better the results will be. It's ideal to have a autommated repeatable test script, but there is no need to get fancy the first time you run JRat.

Shut down your program. JRat will produce several files containing the data it collected.

2. View The JRat Results

After you shut down your application, JRat will create data files that contain information about your program's execution. JRat puts these files in a subdirectory under the directory from which your program ran. This directory will be named something like jrat.output/2007-08-30_AM-08-02-44.

These data files are not human readable. They require the JRat Desktop to open and analyze them. The JRat Desktop is contained in the same jar file that was used in the first step.

java -Xmx256M -jar shiftone-jrat.jar

The JRat Desktop application will open, and you can use it to view the collected data. To do this, select File then Open from the menu. Navigate to the subdirectory of jrat.output and open a .jrat file.

If you want to know more about what just happened, read How It Works.