Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Configuring a Performance Profiler

To successfully improve the performance of a TopLink application, you must measure performance before and after each optimization. TopLink provides a variety of built-in performance measuring features (known as profilers) that you can configure at the session level.

Table 77-10 summarizes which sessions support performance profiler configuration.

Table 77-10 Session Support for Performance Profiler Configuration

Session | Using TopLink Workbench | Using Java
--- | --- | ---
Server and Client Sessions |  |
Session Broker and Client Sessions |  |
Database Sessions |  |

TopLink provides the following profilers:

- TopLink profiler: logs performance statistics for every executed query in a given session (see "Measuring Performance With the TopLink Profiler")

- Oracle Dynamic Monitoring System (DMS): includes DMS instrumentation in essential objects to provide efficient Web browser based monitoring of run-time data in TopLink-enabled applications (see "Measuring Performance With the Oracle Dynamic Monitoring System (DMS)")

## Using TopLink Workbench

To specify the type of profiler in a session, use this procedure:

Use the following information to select the profiler option to use with this session:

Option | Description
--- | ---
No Profiler | Disable all profiling.
DMS | Enable Oracle Dynamic Monitoring (DMS) profiling. For more information, see the following: "Configuring the Oracle DMS Profiler" "Measuring Performance With the Oracle Dynamic Monitoring System (DMS)".
Standard (TopLink) | Enable TopLink profiling. For more information, see the following: "Configuring the TopLink Performance Profiler" "Measuring Performance With the TopLink Profiler"

## Using Java

You can use Java to configure a session with a profiler using `Session` method `setProfiler`, as Example 77-5 shows.

Example 77-5 Configuring a Session with a TopLink Profiler

    session.setProfiler(new PerformanceProfiler());

To end a profiling session, use `Session` method `clearProfiler`.