Terrasoft ProfilerJTerrasoft ProfilerJ
Home | Features | Screenshots | Documentation | Download | Evaluate | Buy | Contact | About
ProfilerJ
Agent
Snapshot file format
ProfilerJ Console
Command line reference
Installation
Content of distribution
Installation
Tutorial
Step 1 - Download files
Step 2 - Deploy agent
Step 3 - Run ProfilerJ Console
Step 4 - Get a license key
Step 5 - Run ProfilerJ Viewer
Step 6 - Sampling
Step 7 - Byte Code Instrumentation
Step 8 - Code Coverage
ProfilerJ Viewer

Step 6 - Sampling

Configure Sampling

Now we gather profile data using the sampling mechanism. First, activate the sampler either from the Overview panel or by selecting the menu "Settings / Sampling and instrumentation rules":

The "Sampling and instrumentation rules" dialog appears:

Select the "enabled" checkbox and save the settings.

Apply sampling

Next, send the sampling and instrumentation rules to the remote VM. Click the toolbar item highlighted below or select the menu "remote VM / apply rules":

 

Resume Process

Next, resume Example01 by clicking " Resume Process". Wait until Example01 is suspended again. Simply  "Synchronize status" until the menu item "Resume process" becomes activated or watch the console output of Example01.

 

Create a snapshot

To create a snapshot select menu item " Create snapshot". The snapshot will be automatically displayed. Select tab "Sampler" and you should see something like this:

The code of method AbstractStringBuilder.append() (called methods excluded!) consumes 44% of the total CPU-time of thread "main". CPU-time consumption for append() and all called methods (i.e. cumulated CPU time) is 72% of total thread CPU time. The respective numbers for elapsed time are 44% and 67%.

 

Show hotspots

The hotspot view lists all methods sorted by CPU-time consumption. Right-click the topmost entry of the tree (named "snapshot ....) and select "  Hotspots". Subsequently, a new tab named "Hotspots" appears:

AbstractStringBuilder.append() consumes the most CPU time, followed by expandCapacity().

«previous   next »

Copyright © 2006 Terrasoft Software GmbH. All rights reserved.