DocumentationJava Profiler HelpTime measurement (CPU time, wall time)
previous      content      next
Time measurement (CPU time, wall time)

This is an advanced topic. It provides additional details that you do not normally have to know to profile your applications.

There are two ways to measure time:

CPU sampling/tracing

CPU sampling and tracing measure:

Customization

To customize for which methods the wall time is measured, create or edit the following configuration file:

<user home>/.yjp/config/.walltime

where user home corresponds to the account under which a profiled application is launched.

This is a text file. Its lines should be in this format:

<fully qualified class name> <method name> <method signature>

Wildcards ('*') are accepted. E.g. the following specifies all methods of class com.Foo.Bar, which names start with 'print':

com.Foo.Bar print* *

By default, the configuration file doesn't exit, so you have to create it to customize the settings. If the configuration file doesn't exist, it is assumed to have the following content:

java.io.RandomAccessFile    readBytes    ([BII)I
java.io.RandomAccessFile    read         ()I
java.io.RandomAccessFile    write        (I)V
java.io.RandomAccessFile    writeBytes   ([BII)V
java.net.SocketInputStream  socketRead0  (Ljava/io/FileDescriptor;[BIII)I
java.net.SocketOutputStream socketWrite0 (Ljava/io/FileDescriptor;[BII)V
 

The settings are read each time you start CPU tracing or sampling. This means you can change the settings without restarting the profiled application.

To measure CPU time for all methods, the settings file should be empty.

Monitor profiling

Monitor profiling measures wall time for all waits and blockings.

previous      content      next