How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

Profiling Performance

This is my concise reference on profiling the execution of computer applications.


Topics this page:

  • Types
  • Profilers
  • Mercury Profiler
  • Your comments???

    RSS XML feed for load testers RSS preview for load testers Site Map List all pages on this site 
    About this site About this site 
    Go to first topic Go to Bottom of this page

    Sound: Galloping horse

    Set screen Types of Profiling

      Profilers usually insert themselves at the byte-code level where machines execute instructions.

      But the location of execution needs to be presented in a way that is comprehensible to mere mortal coders.

      So profilers usually work with source code IDEs (Integrated Development Environments) such as Eclipse and Microsoft Visual Studio.

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Profilers

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Mercury Profiler

      Before being acquired by HP, Mercury used to offer a free download of the Diagnostics Profiler. The file is 405,672 KB. When executed, it creates by default a "JavaProbe" folder within C:\MercuryDiagnostics.

      To configure it, cd \MERCUR~1\JAVAPR~1\bin and run jreinstrumenter.cmd for this screen

      In the "Mercury Java JRE Instrumation tool" pop-up, click "Copy Parameter" for


      Also add -Xrunheapdump to enable heap dumps within the profiler.

      Click Exit and Paste the text in the JVM startup script file.

    • Run profiler.cmd
      This screen should appear after it sets these environment variables:

        PROBE_HOME and
        JAVA_EXE=java and

      Closing the command window shuts down the service.
    • Instead of highlighting the screen (which disappears), copy from here:

    • Start the application server navigate to the "Arguments" field where JVM parameters are entered. For example, if you're using the WebLogic MedRec benchmark application click to medrec > Servers > MedRecServer > Configuration > Remote Start

      Paste the string and click "Apply".

    • Restart the server: Navagate to "Control" > "Start/Stop" and click "Graceful shutdown of this server..." and confirm "Yes". Wait for "TASK IN PROGRESS" to turn to "STOPPED". Then click "Start" and Wait again for "TASK IN PROGRESS" to turn to "STARTED".
    • Click the "Connect to Mercury Diagnostics Profiler" link for this screen which graphs the Memory used, the Load, and Slowest Requests.

      http://localhost:35000/profiler/ (after authenticating for default "admin" userid and password) opens an internet browser with the same (albeit slower performing) Java applet.

      Mouse over the graphic for tooltip information.

      Click the "Show Legend" tab for this screen

      The tabs:

      • "Hotspots" tab graphs the "Slowest Methods" and "CPU Hotspots"
      • metrics
      • "All Methods"
      • "All SQL"
      • "Collections" require light-weight memory diagnostics instrumentation and capture to be enabled in the probe.
      • "Exceptions" only for instrumented methods.
      • "Server Requests" for each Layer
      • "Web Services"
      • "Heap Breakdown"

      The profiler tracks where time is spent by each J2EE instance?

      It also tracks VM heap usage, so it can rank collections by memory usage and

      ??? How does it identify memory leaks during GC??

      It tracks hold times by sychronization lock ???

      It counts exceptions and trace information ???

      The J2EE Probe captures events such as method invocations, collection sites, and when business and server transactions begin and end.

      Click the "Metrics" tab and expand the tree:

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Profiling Strategy

      The basic strategy is to identify the most time consuimg component, identify tunables, conduct tuning experiments, then move on to the next component.

      So rather than immediately going to the most likely component, it's best to begin with an open mind. The value of a profiler is that it may identify issues in components where you didn't expect to cause delays.

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Portions ©Copyright 1996-2011 Wilson Mar. All rights reserved. | Privacy Policy |

    Related Topics:
    Rational Robot 
    Free Training! 
    Tech Support 

    How I may help

    Send a message with your email client program

    Your rating of this page:
    Low High

    Your first name:

    Your family name:

    Your location (city, country):

    Your Email address: 

      Top of Page Go to top of page

    Thank you!