Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic, Java IoT

Weblogic: Article

Putting Enerjy Software Tools To The Test at JavaOne 2005

From set top boxes to wireless messaging

Another feature that distinguishes Enerjy Memory Profiler from other profilers out there is that it automatically identifies parent leaks, letting you optionally filter out consequential leaks that can be resolved simply by releasing their parents.

The status view function can be activated when a profiling session begins and lets the developer take snapshots, clear collected data, and pause/terminate/resume the application.

Finally, Memory Profiler can profile remote applications including J2EE application servers via a single JVM argument.

In short, Enerjy Memory Profiler is invaluable when it comes to pinpointing Java memory leaks and understanding system memory considerations. The results are often surprising.

Enerjy Performance Profiler
Enerjy Performance Profiler shows you where a particular method in your code is spending its time, both in terms of the actual time spent in sub-methods and the number of calls made to those methods. This information is shown in a number of tables so you can drill down and pinpoint the methods on the critical path. Doing this identifies which methods should be optimized for the best overall improvement in your application's performance.

It shares all of the common traits I outlined above and like Memory Profiler, Performance Profiler integrates seamlessly with the IDE. In fact, if you didn't know it was a separate tool, you'd never know that you were working with something other than your IDE.

Performance Profiler displays real-time status views of heap and thread activity while profiling, and collects both absolute clock time and relative application time for each method. And the good news is that the overhead is minimal.

You can get a quick, at-a-glance view of the worst performance offenders at each method call.

Performance Profiler also shares the same cool feature that Memory Profiler has - on-the-fly profiling. Again, the developer can change configuration settings on-the-fly - while the application is being profiled - without having to restart the application. A real time saver and a revolutionary approach to Java profiling.

The status view function can be activated when a profiling session begins, displaying current (real-time) total/used heap sizes and the running/blocking state of each thread while the application is running. Performance Profiler lets the developer take snapshots, clear collected data, and pause/terminate/resume the application.

Finally, Performance Profiler can also profile remote applications, including J2EE application servers via a single JVM argument.

This tool is a real boon when it comes to focusing your performance optimization efforts.

Enerjy Thread Profiler
Once again, Enerjy Thread Profiler is no different to Enerjy's other profilers in terms of low runtime overhead, reporting capabilities and tight IDE integration. In fact, when it comes to IDE integration, they've done a fine job of fooling you into forgetting that you even have the tools running.

Enerjy Thread Profiler pinpoints each Java thread deadlock when it occurs, identifying all participants and the code that caused the deadlock. It displays a real-time status view of heap and thread activity while profiling and lets the developer take snapshots and pause/terminate/resume the application.

Thread Profiler also gives you a quick, at-a-glance view of monitors by thread or threads by monitor, and it can profile remote applications, including J2EE application servers via a single JVM argument.

With comprehensive graphs outlining all Java thread processing and monitor activity, Thread Profiler gives you a better understanding of your application to find and fix Java thread problems or fine-tune monitor usage.

I would be doing you no service if I didn't call out some of what I see as the tools' drawbacks.

First, I'm not a real fan of Enerjy's documentation. It's very pretty (above average, in fact), but I expect that from a quality software company these days. Where it falls short is on the content. For example, I found that I could read the 60-or-so pages on Memory Profiler and feel that I had learned virtually nothing. Lots of words and tables and pictures, but little information. I want more background content and in-depth product information.

The other major gripe I have with the tools is that they seem short on options. Don't misunderstand me: they're not short on functionality, but I sometimes felt as though I might be missing something...as though the GUI hadn't communicated to me clearly.

Java Tools You'll Use
The company likes to say that they create tools you'll actually use (as opposed to "shelfware"). I tend to agree with them. You should have no doubt that these are serious debugging tools for software developers at the highest level, and are not for simpletons who don't know how to program. No matter how experienced a software developer you may be, I challenge you to find standards-, memory-, performance-, or thread-related problems in Java code in a faster or more cost-effective way than using these tools.

More Stories By Alan Barclay

Alan Barclay holds an honors degree in electronic and information engineering, and is a hardware and software engineer at Electric Scribe. He has been writing Java applications since the beginning of 1998, and is a Sun Certified Programmer for the Java 2 Platform 1.4.

Comments (2) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

Most Recent Comments
WLDJ News Desk 07/28/05 07:44:02 AM EDT

Putting Enerjy Software Tools To The Test at JavaOne 2005. As an independent software developer/consultant starting my career in the early '90s, I was exposed to a large number of different working environments and challenges. My specialty for a while was HP C++ and Motif (often using Interface Architect) on HP-UX, but over the years I migrated towards Sun's C++ and GCC compilers along with X Designer on Solaris.

Alan Barclay 06/27/05 06:25:44 PM EDT

Putting Enerjy Software Tools to the Test. As an independent software developer/consultant starting my career in the early '90s, I was exposed to a large number of different working environments and challenges. My specialty for a while was HP C++ and Motif (often using Interface Architect) on HP-UX, but over the years I migrated towards Sun's C++ and GCC compilers along with X Designer on Solaris. Regardless of the compiler or platform or challenge, there were a couple of tools I always had to have on hand Purify and Quantify (now available from IBM Rational), because they were absolutely invaluable in helping identify subtle problems in C and C++ code.

However, as the '90s drew to a close, I became an independent Java developer, and things like memory analysis, for example, wasn't necessary. Java's got a garbage collector after all, so we don't have to worry about that sort of thing, do we? Some of you are smirking as you read this, because you know the sarcasm with which I wrote that.

Before I let go of my C++ analogies, there was another tool that I carried around with me in my C/C++ days, but this one was a stack of paper rather than a piece of software. It was a document called "Programming in C++, Rules and Recommendations" by Ellemtel Telecommunication System Laboratories, and was an excellent starting point for getting a new team of disparate software developers coding in a standard fashion. Without any intervention, different developers will write code in different styles, leading to delays and potential comprehension problems. Setting coding standards makes it easier for developers to read and understand each other's code.

I'm sharing my past experiences with C/C++ tools with you as a backdrop to a discovery I made a couple of years ago after I forayed into the world of Java development...a discovery that I'll share with you in this product review.

Early in 2002, I stumbled across the Enerjy Software exhibit at a Sun TechDays event in London and was instantly impressed. This article will tell you about my experience using Enerjy's four Java development tools: Enerjy Code Analyzer, Enerjy Memory Profiler, Enerjy Performance Profiler, and Enerjy Thread Profiler. For any Java developer looking to eliminate coding inconsistencies and establish coding best practices, or wanting to combat memory, performance, and thread deadlock issues with Java, this review is for you.

Before I give you the lowdown on the tools, let me describe the development environment in which I work and the sort of Java applications I write. I use Sun's JDK 1.4.2 with Eclipse 3.0 to write real-time data presentation applications (live data feeds). These apps often involve either an Oracle or Sybase database and/or a Web site. In all cases, I'm working on data presentation, graphics, Java3D, and the like. When I wrote this, I reviewed Edition 6 of the Enerjy tools.

Now on to my review of the tools...

Enerjy Code Analyzer
Enerjy describes Enerjy Code Analyzer as a "best-practices audit tool," but I prefer to think of it in terms of a tool that pinpoints deviations from a "fully configurable" set of rules and recommendations. It's a feature-rich, powerful, low-cost Java code analyzer that I use to rapidly validate the code contributions from the half-dozen Java developers on my project, some of whom are in a different country, making it hard to look over their shoulder as I would if they sat near me.

Enerjy Code Analyzer goes beyond pointing out issues with syntax, layout, and style; it's also extremely language-aware. By that, I mean that it identifies omissions and potential errors such as "Switch statement missing default," "Inner class does not use outer class," and "Field hides a superclass field"; mistakes that even the most experienced developer can make. In all, it identifies violations of over 200 Java and J2EE rules and lets you write your own rules for Java code analysis and reporting if there's something unusual that you want it to watch out for.

Enerjy Code Analyzer integrates tightly with most common IDEs: Eclipse, WebSphere Studio Application Developer, JBuilder, JDeveloper, NetBeans and Sun ONE on Windows, Solaris, and Linux (x86). Alternately, it can be run as an Ant process - as part of a nightly build, for example - producing a text, HTML, or XML report by project or by each developer. Whether looking at the output in report form or highlighting it directly in the IDE (as shown by the tooltip and problem pane in Figure 1), the problems are well described and located for easy identification and resolution.

Code Analyzer's other features include rule prioritization and file filtering.

Rule prioritization lets you prioritize the existing rules as well as the ones you custom-build. And because of its tight IDE integration, the assigned priority looks just like your IDE's prioritization convention. If necessary, you can choose to fail a build if certain rules have been violated.

File filtering is a neat feature that lets a developer ignore certain code...like auto-generated code that will be overwritten later on. Code Analyzer lets you remove single files or entire packages from consideration.

Whether used by a team leader to check that all team members are obeying the coding standard or used by oneself as a constant reminder that there can be no slacking in professional software development, Enerjy Code Analyzer is great for focusing on quality. Over the years I've come to believe that if you establish coding standards with every development project, you'll pre-empt bugs, save time, and develop more stable and reliable applications. And it doesn't make a difference if you're working in a large team for a big corporation or on your own, making a small application for a client - the need for quality and consistency is the same.

Enerjy Profilers
I'll break down the individual profiling tools in a minute, but there are some common features shared by all three of Enerjy's profilers that are worth pointing out upfront.

First of all, just as with Enerjy Code Analyzer, all of the profilers integrate tightly with the IDE. In the case of the profilers, they work with Eclipse, WebSphere Studio Application Developer, and JBuilder on Windows, Solaris, and Linux (x86). Each tool profiles existing launches with minimal configuration from the IDE directly.

All three profilers feature graphical representations of the data and display real-time status views of heap and thread activity while profiling. Finally, the data from the profilers can be exported in tab-delimited or comma-separated format, letting you view, print, or chart your progress.

Enerjy Memory Profiler
Enerjy Memory Profiler exists to help you understand what's really going on behind the scenes of your memory allocation calls. Integrated with the IDEs outlined above, it can display a real-time status view of heap and thread activity, and it associates heap and object graph artifacts directly back to the relevant methods. Figure 2 shows an example of Memory Profiler with the change in memory usage of a particular application over time.

Do you really know how much memory your application or even a particular method is allocating? Memory Profiler can tell you. By monitoring individual methods, it can tell you how often they're called and the number and size of the objects actually being allocated.

Are you certain that you're not leaking any memory every time you use a certain method? Don't forget that the garbage collector can only recycle memory if nothing is holding a reference to it. Memory Profiler identifies Java memory leaks that survive method boundaries, showing where the object was allocated and how it escaped garbage collection.

A cool feature of Memory Profiler - something I haven't seen in other Java profilers - is something called "on-the-fly profiling." Basically a developer can change configuration settings on-the-fly - while the application is being profiled - without having to restart the application. Any developer who's had to do this knows how frustrating it is and the time it takes away from the curly braces and semicolons.

IoT & Smart Cities Stories
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...