Now that you have created a project, it is time to specify:
your development project's source files
the type of testing or runtime analysis activity you would like to perform first
To start a new activity:
Once a project has been created, the user is automatically brought to the Activities page. In this tutorial you are starting with a focus on the runtime analysis features, so select the Runtime Analysis link. This will bring up the Runtime Analysis Wizard.
In the window entitled
Application Files, you must list
all source files for your current development project. For this tutorial,
you will directly select the source files. Select the Add
button.
Browse to folder into which you have installed Test RealTime and then access the folder \examples\BaseStation_Java\src\baseStation
Make sure
All Java Files in the Files of
Type dropdown box is selected, then select all of the eleven Java
source files. Now click the Open
button.
You should see these eleven files listed in the large listbox of the
Application Files window.
Click Next.
At this time, an analysis engine parses each source file - referred to as tagging. This process is used to extract the various methods and classes located within each source file, simplifying code browsing within the UI.
In the window entitled Selective Instrumentation you have the ability to select those classes/methods that should not be instrumented for runtime analysis. Such selective instrumentation ensures that the instrumentation overhead is kept to a minimum. For this Tutorial, you will be monitoring everything, so simply click the Next button.
In the window entitled Configuration Settings for Java, you need to define your application's class path as well as the fully qualified name of the main class for your application.
In the Class path
text box, click the button, then the
button,
and then browse to and select the folder \examples\BaseStation_Java\src
(located in the Test RealTime
installation folder). The package used by the Java-based UMTS base station
is named baseStation, and it's
located in the src folder you
just referenced.
Note For Windows users, if a folder in the path has a name containing a space, change that name following the DOS 8.3 naming convention rules (such as replacing C:\Program Files with C:\Progra~1).
In the Java main class text box, select the BaseStation class from the dropdown list. Your screen should look like this:
Now click the Next button.
You have now reached the window entitled Application Node Name. Enter the name of the application node that will be created at the conclusion of the Runtime Analysis Wizard; since you will be monitoring execution of the Java-based UMTS base station, type the word BaseStation within the text field labeled Name.
You also need to
make some minor changes to the way you would like the TDP to be used.
These modifications are specifically aimed at the memory profiling feature
and are being used simply to illustrate additional concepts within the
Tutorial.
At the bottom of the Application Node Name window, click the Configuration Settings button.
Expand the Runtime Analysis node on the left-hand side of the Configuration Settings window, expand the Memory Profiling child node, and then left-click the JVMPI child node.
Test RealTime uses the JVMPI interface of supported JVMs to acquire memory profiling information. The following custom changes should be made to the Configuration for the purposes of this tutorial:
On the right-hand side of the window, set the Value of the Generate Snapshot setting to After Each Garbage Collection. Though it is possible to interactively take memory snapshots during execution, setting this option ensures you will have sufficient data to work with in this tutorial.
Set the Value of Display Only Listed Packages to baseStation (the Value is case-sensitive, so enter it carefully). This setting ensures you filter out references to objects derived from classes not explicitly defined within the application-under-test.
Set the Value of Collect Referenced Objects to Yes. By collecting referenced objects, the memory profiling diff functionality will provide greater visibility into whether or not the application-under-test is properly allocating/deallocating objects.
In the Configuration Settings window, click Ok.
In the Application Node Name window, click Next.
You are now confronted with the Summary window. Everything should be in order, so click Finish.
The BaseStation application node has now been created in the Project Explorer window, on the Project Browser tab, located on the right-hand side of the user interface. If you expand the BaseStation application node, you should see the following:
Why is the exclude
status indicated for all but one .java
file? This is because the build process need only reference the source
file containing the main Java class when calling the Java compiler. This
source file is BaseStation.java.