Request tracking
In this screencast, I explain what request tracking is and how to use it taking the example of executors in the java.util.concurrent package.
In this screencast, I explain what request tracking is and how to use it taking the example of executors in the java.util.concurrent package.
In the screen cast below, I give a short overview of the capabilities of probes and the built-in probes that are included in JProfiler 7.0.
In this screencast, I explain the two modes of CPU profiling, sampling and instrumentation and how they are activated in the JProfiler GUI. Choosing and understanding these modes is important for getting good results.
In the screencast below, I explain how to analyze exceptionally slow invocations of frequently invoked methods. By using the method statistics and exceptional method run features in JProfiler, the slowest invocations are shown separately in the call tree.
The test class that is profiled in this screen cast is given below:
import java.util.Random;
public class MethodStatisticsTest {
private static Random random = new Random(0);
public static void main(String[] args) {
while (true) {
doCriticalTask();
}
}
private static void doCriticalTask() {
if (random.nextInt(1000) % 999 == 0) {
implOne();
} else {
implTwo();
}
}
private static void implOne() {
for (int i = 0; i < 100000; i++) {
Math.sqrt(i);
}
}
private static void implTwo() {
for (int i = 0; i < 1000; i++) {
Math.sqrt(i);
}
}
}
In the screencast below, I explain how to automate profiling with offline profiling and triggers, so that you do not have to use the JProfiler GUI for profiling and can analyze profiling results later on.
In the screencast below, I explain how monitor events in the locking history graph can be cumulated and how you can select monitors and threads of interest.
In the screencast below, I discuss cross-links between the various monitor views. The profiled test program is the same as in the screencast on Locking graphs in JProfiler.
In the screencast below, I present some of the features in the locking graphs that have been introduced in JProfiler 6.
The test class that is profiled in this screen cast is given below:
public class MonitorTest {
// The only monitor that all threads are blocking or waiting on
private static final MonitorTest monitor = new MonitorTest();
public static void main(String[] args) throws InterruptedException {
// All threads execute this runnable, each thread acquires the
// monitor, works for 3 seconds and then waits on the monitor
Runnable runnable = new Runnable() {
public void run() {
synchronized (monitor) {
try {
// Instead of doing any real work, the thread just
// sleeps for 3 second
Thread.sleep(3000);
monitor.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
};
// 3 threads are started with an offset of 500 ms
new Thread(runnable, "Test Thread 1").start();
Thread.sleep(500);
new Thread(runnable, "Test Thread 2").start();
Thread.sleep(500);
new Thread(runnable, "Test Thread 3").start();
// After 20 seconds, all threads are woken up and the test class
// terminates
Thread.sleep(20000);
synchronized (monitor) {
monitor.notifyAll();
}
}
}
In the screencast below, I explain allocation recording in the dynamic memory views in JProfiler.
In the screencast below, I explain the thread status selector and the different threads states in the CPU profiling views.