the Eclipse Performance Monitor
Tags: eclipse, performance, monitoring
Published: 2020-05-21 09:44:58

<h2>Introducing the Eclipse Performance Monitor</h2>



<p>Eclipse IDE (Integrated Development Environment) is a multi-lingual development setting for almost any programming language you could think of – Java, C, C++, Clojure, Groovy, Haskell, JavaScript, Julia, Perl, PHP, Ruby, Rust, and much more. Nonetheless, eclipse is famous for being a dedicated Java IDE</p>



<p>Listed as one amongst the top three Java IDEs, this next-generation IDE is available in both desktop and cloud editions, hence its extensive clientele. But as the saying goes; “<em>To Whom much is given much is expected.</em> With an <g class="gr_ gr_6 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="6" data-gr-id="6">increasing</g> large user community, the requirement for certain functionality becomes more needful over time.&nbsp;</p>



<p>For a renowned IDE like Eclipse, the feasibility of such serviceability as debugging, performance monitoring, profiling etc., has to be treated with a specific degree of sensitivity. Which is why we would be discussing on how to perform one of the most crucial aspects in the software development life cycle on an eclipse environment – performance monitoring on an Eclipse IDE.&nbsp;</p>



<h2>How to Execute Performance Monitoring on An Eclipse IDE</h2>



<p>For web artisans who are well-versed in the Java programming language, looking to include distinctive functionalities on the Eclipse IDE, a PDE (Plugin Development Environment) is conveniently available for this. This PDE allows the IDE to flaunt robust tools that aid developers in speeding up the entire development process. Yet, for more in-depth capabilities, it is best to utilize an exclusive eclipse performance monitor viz <a href="https://www.fusion-reactor.com/java-eclipse-apm/eclipse-performance-monitor/">FusionReactor</a>.</p>



<h2>The UI Freeze Monitor</h2>



<p>Eclipse IDE is providing an all-inclusive application programming interface. And as earlier mentioned, it comes fully packed with its own performance and profiling toolset in addition to an external plugin additive – all thanks to the PDE. Consequently, before we go into the details of using the dedicated performance tracing facility of the Eclipse IDE, we ought to talk about the interactive UI monitoring tool that comes with the Eclipse IDE. To activate this responsive UI performance measurement feature you would have to navigate to the preference tab on your window. You can do this by following these few steps below.</p>



<h3><strong>Steps: &#8211;</strong></h3>



<p> 1 Click on Windows <strong>&gt; </strong>Preference <strong>&gt;</strong> UI Responsiveness Monitoring.&nbsp;</p>



<figure class="wp-block-image"><img src="https://lh4.googleusercontent.com/pl_JKeQUHrxgLQ68u1yAyzIyCQYHw0DKqkKWIFcmzi4MU-NK_xyy_xpqxopFoE42Ye-GwKWpp7YBodK9vcVSPBjU10ZMTcMTlSWOrTLSy_zaCG3rcOKhOb6z4vz8ebIY3dlOPuZuYYP5MZsL3w" alt=""/></figure>



<p> 2 Once activated, a window would pop on where a stack trace would write to the Errorview, in case there is an occurrence of a UI freeze just like the window below.</p>



<figure class="wp-block-image"><img src="https://lh5.googleusercontent.com/i4EpKt-laBGShTZ1VAYFsebV0StVI8C8ykDCHQig4H8r3kESjTrOeIwUPT9nGiVH8tZticwlKqqQ0qY-SgbRFXAItYclR-0eiLmrBerVRe_HHLP0cLmg1mv_lLBkwwsfGSnBmQbN38Qlq6EpwA" alt=""/></figure>



<p>During the event of a deadlock, it is best that you report such freezes <a href="https://bugs.eclipse.org/"><em>https://bugs.eclipse.org/</em></a>, so that the team can fix these.</p>



<p></p>



<p>For the rest of this guide we would be highlighting on the integrated performance inspecting facilities of Eclipse. Along with steps on how to implement this scrutiny in the most detailed way possible. Let’s immediately get into the nitty-gritty of using a custom-built performance checker.&nbsp;</p>



<h2>Utilizing the In-built Tracing Instruments of Eclipse.</h2>



<p>The Eclipse IDE proffers a tracing proficiency which can be activated on demand. Upon activation, additional plug-in information is written to the console at runtime. You can activate the native tracing feature through the -debug&nbsp;start parameter. At which time the IDE would search for the .options&nbsp;file in the directory where the installation file for Eclipse is being held up. The file would then be set to the <em>‘one key=value pair per line’</em> property.</p>



<p>The plugin is designed such that you can see the tracing option in the preference settings by default. It is also possible to initiate this tracking options at runtime. An example of the Eclipse IDE preference is shown in the following screenshot.<br /></p>



<figure class="wp-block-image"><img src="https://lh3.googleusercontent.com/FRS1jBQp7YFEiv0d55_jixRbEF_1d4F62L1AKvsRk2U6FwFuWVjQf1qefWK3YHmYgbega-neLop9PcKs34yqR3M0aD-hQo3En2x4vaWZbWsoldTnRBOzXb3xpVfzss3NNf2ixOaIwpSWzD48uw" alt=""/></figure>



<p>These tracing options are also available for a launch configuration. The following examples are going to be slated for specific tracing functions.</p>



<h2>Tracing the Start-up Time of Plug-ins</h2>



<p>In this example, we would trace the start time of each plug-in during start-up. For this, we would be creating a distinct .options&nbsp;file just like we did in the last instance, but this time with a different content as shown below;</p>



<figure class="wp-block-image"><img src="https://lh3.googleusercontent.com/kjyJ3DS_cxmV8FpYQxRhgqTjVkvkIcNfi14Cz3HfJfa7atF6uD-pTER72ORNSZnwM_PJoZU6BIlWrnB8OVlQGImQmVqtUh5mhc0cH9eKJiJ46IgCKO0hBVH4-fyobt9OT5gq3Wpejh3S7qUl5A" alt=""/></figure>



<p>Use the underlisted command to start Eclipse;<br /></p>



<figure class="wp-block-image"><img src="https://lh5.googleusercontent.com/fnb4nnMvzhOuSVIImyrb7D_roqA3NfiA5nFYukhFTp31uqI1Q7H1NgVXJpSSlVhnifOkzHYY_nIDJFBFstpKfMa6mUThYtt3w2MiYeC9vGhwJnvdcP7A0T7VQ6GxfZbJYdqx9lKjOfyKsp_fPA" alt=""/></figure>



<p>The <em>‘Starting application timestamp’ </em>describes when OSGI (Open Service Gateway Initiative) is done with its activation process. Subsequently, its <em>‘Application Started’ </em>time reference indicates when the application starts, just as the name imply. After which you extract the information you are most interested in. For instance, the above example is only a small script that extracts the time of the activator of each bundle. Thereafter, sorting every bundle by this time.<br /></p>



<figure class="wp-block-image"><img src="https://lh5.googleusercontent.com/ThZjwDTqMLurPfVoF6nvmzVQPcUHEl6XC9hyqYaWMtwAfLBYKJ9yBpIHDT23eaSjM1ia4e3V5uCs1Zo0CeU2BXlorikJ3-VxHqT2AagbtV8Q8EGuSowaqbgKCzTDZa-m_Ad-ZdTKi6194Ue1gg" alt=""/></figure>



<h2>Monitoring the Resource Plugin.</h2>



<p>The following example uses the same .option file to trace resources.<br /></p>



<figure class="wp-block-image"><img src="https://lh6.googleusercontent.com/x8Lcvk7ImKK2jAazu2xpmqAH9eBaa_olJgjKBSTq22AM32f96bS1GO0bb2oKczgtxT3m9XnVU8jdUUmfnnc4yLpABHC48gO04zZ98oYSFQjQUv5hUpZoo8qIZZPtOYf3xCba_yQ5eZom0YjL5g" alt=""/></figure>



<figure class="wp-block-image"><img src="https://lh6.googleusercontent.com/QCpRRceDKW7SUNHsA8fRrtKYcRpzDuo8eEP_2D9l0Rw8Dm-XXbxtMFcDVBe6CfJ0KEFOsY1BXypxllVL5qRYyiM2yQEQ0DGgjAVUzzr32A6urJIPz0yuz5rHQ45nqogmgFnvNL7qWNDUbpoDog" alt=""/></figure>



<figure class="wp-block-image"><img src="https://lh4.googleusercontent.com/jHW0ZAxUQetnoMaHSuoaqtCTbns9vL3QGj2Zywz2po7RXkyxsjvrn7_08BBF7zFgDv3ZFWAWC6mCQieb9f3zCyXT_5dUBFvJDjEgG6zgH_4acB8GvFxz-86TCiClU5cLpePSm4R867F0nRQ8HA" alt=""/></figure>



<h2>Implementing Tracking for your Custom Plugin</h2>



<p>By means of the <a href="https://www.winklerweb.net/index.php/blog/12-eclipse/10-finding-the-almost-new-eclipse-tracing-api">Eclipse Tracing API</a>, users can also implement tracing for their custom plugins. To enable users, include their tracing options to the preference page, they would have to turn them on at run time. Using the extension to route to the org.eclipse.ui.trace.traceComponents. See the TracingPreferencePage<strong> </strong>for more details on how to implement this.<br /></p>



<h2>Tracing for Key Binding</h2>



<p>The tracing functionality of Eclipse allows one to trace which commands are associated with certain key binding. The following listing contains the trace options to enable that.<br /></p>



<figure class="wp-block-image"><img src="https://lh3.googleusercontent.com/j3pNfA6VHvVL0W95lCMZcx-vLwFcEsm0dbzONn432OdK2KS3II2oL-YHb4GXQIQITPItCthTaKUJLp3earnkDfh7amvRXMhTtZQAfophCDDNByPPCzhm_7euXho7-Lhz9tpqyyALbxHla1VxvQ" alt=""/></figure>



<h2>Eclipse Sleak</h2>



<p>The Sleak monitor tracks the creation and disposal of SWT (Standard Widget Toolkit) graphics resources. You can get this feature directly from <a href="http://www.eclipse.org/swt/tools.php">SWT Development Tools</a> or install the Eclipse plugin via the <a href="http://www.eclipse.org/swt/updatesite.php">SWT Tools Update Sites</a>.</p>



<p>To activate the Sleak functionality, you can use the <em>‘Tracing’</em> tab in your Eclipse runtime configuration.<br /></p>



<figure class="wp-block-image"><img src="https://lh5.googleusercontent.com/O3-MdcmMDVbh6xiS7lBhYNHEyEvnirxQ8gC4QlSkF8E1NgZPmdGbQ3ikkiAemO8d00bHEQ3iqhuOwpefQp32DIw_K0BdedjuprYlLQme-aQGP7BxEVSrPYM_llpmOCp8TLUCBaFOVdECXnEwKA" alt=""/></figure>



<figure class="wp-block-image"><img src="https://lh3.googleusercontent.com/W46kGTDpDXHdGAJK2T50VsB0eAw1nGP8DWAMdfB_yRWq4m6DGrl1vlLgvCjvxJ693BcOY4WzCWvKCb0-zaP9PlbrNNOHrAa3Ipki-fR-CD1byZcN5DJna24N103NgEWTpimfkXUtsdha5Di52Q" alt=""/></figure>



<p></p>



<p>You could also use active this component on the Eclipse IDE. To do this, you would have to start Eclipse with the -debug&nbsp;option from the command line terminal. You would also need to create a .options&nbsp;file in the Eclipse installation directory with the following entries;<br /></p>



<figure class="wp-block-image"><img src="https://lh3.googleusercontent.com/dbsjmAOJh3TRkjcUPi0o-Tjx--NcxL3Uxkw5fGecVkJVNW4SBvN86nddmWJ-W_DCZqe5D89f7sLI3shT0E8_5xXvxTrDSgcyYtpk_jy5xo8k10P7uabgmkry9RJSQ-QJ3OfPJnngZ3ksdc1ELA" alt=""/></figure>



<p>Once you start the Eclipse IDE, you could find the Sleak view under;<br /></p>



<p>	Window <strong>&gt; </strong>Show View <strong>&gt;</strong> Other…<strong> &gt;</strong> SWT Tools <strong>&gt;</strong> Sleak.</p>



<p>Sleak allows you to take snapshots and conveniently creates a difference for comparison. You could click on <em>‘Stacktrace’</em> to access the stack trace utility that lets you view where the resource was allocated.<strong> </strong>Other tools that could be used for Eclipse performance monitoring includes <a href="https://profiler.netbeans.org/">NetBeans profiler</a><strong>, </strong><a href="https://www.fusion-reactor.com/java-eclipse-apm/eclipse-performance-monitor/">FusionReactor</a><strong>, </strong><a href="http://www.tagtraum.com/gcviewer.html">GC Viewer</a>, <a href="https://visualvm.github.io/">VisualVM</a>, <a href="http://jiprof.sourceforge.net/"><strong>JIP</strong></a>, to name a few.</p>



<h2>Minimize server downtime</h2>



<p>The overall idea of monitoring performance in your Eclipse environment is to ensure you actively minimize server downtime, and speed up the time to resolve the issue. Even though there is an endless list of tools for performance monitoring on a Java development environment such as Eclipse, FusionReactor stands out amidst the crowd. Reason being that FusionReactor outstrips conventional monitoring since it actively tunes the Eclipse IDE, minimizes server downtime and accelerates time to resolution unlike any other Eclipse Performance Monitoring tool obtainable.</p>



<p>&nbsp;<a href="https://www.fusion-reactor.com/java-eclipse-apm/eclipse-performance-monitor/">Fusion Reactor’s</a> performance monitor comes with a unique package that outclasses many conventional monitoring platforms. It gives you a broad and instant view of what is going on within your Eclipse environment so you can evaluate how much time is needed for each transaction.</p>