Previous Topic

Next Topic

Book Contents

Book Index

Starting Local Profiling

When mBProfiler executes local profiling it takes an application's main file and runs it on a local JVM. More specifically, the Profiler Frontend, the Profiler Agent and the profiled application will be started at the same host. You can profile locally Java Applications, JUnit tests, JUnit Plug-in tests, Eclipse applications and an OSGi framework.

Prerequisite: Setup an Eclipse JRE that is supported by mBProfiler.

To locally profile an application, use one of the next approaches.

Directly from the Package Explorer

You can directly start an application in profiling mode from the Package Explorer – use the Profile As > <application_type> option where <application_type> could be Java Application, JUnit Test, JUnit Plug-in Test, Eclipse Application or OSGi Framework:

As a result, the application will be started in profiling mode based on the settings in a profile launch configuration named after the file/project name. You can preliminary create such a configuration in the Profile Configurations dialog (Run > Profile Configurations) and pre-configure the runtime and profiling settings. Otherwise, such a launch configuration will be automatically created and populated with default settings.

Once the profiling is launched, you can control its execution from the Profile view.

From the Profile Configurations Dialog

You can start the application in profiling mode by creating a special profile launch configuration and there providing settings for the profiling process.

  1. Open the Profile Configurations dialog:
  2. According to the application type right-click the relevant launch configuration, that is, to Java Application, JUnit, Eclipse Application, JUnit Plug-in Test, OSGi Framework, and select New. A profile configuration of the selected type will appear.
  3. Go to the mBProfiler configuration tab and fill in the profiling tasks as described in the Configuring General and Auto-Start Session Settings document.
  4. If needed, define profiling triggers in the Triggers configuration tab as described in the Defining Profiling Triggers document.
  5. Depending on the application type provide other launch information if required, such as the workspace project holding the application, etc.
  6. Click the Profile button to begin the profiling. In case you would not start profiling right away, click Apply to save the changes.

Once the settings are saved to a launch configuration, you can quickly start profiling by selecting the configuration directly from the button pull-down menu or from the Run > Profile History sub-menu.

Once the profiling is launched, you can control its execution from the Profile view.