How to Profile NetBeans Platform Applications?

A task I've set for myself is to provide documentation for the development environment around the NetBeans APIs, i.e., documentation relating to testing, debugging, profiling, and continuous builds. As I work on these very important and underdocumented aspects, I'm learning a lot. While writing the NetBeans Platform Testing Tutorial, I learned that unit testing, functional testing, and code measurement support is built INTO the NetBeans Platform build harness, meaning that all these tools and frameworks are AUTOMATICALLY part of your application's infrastructure when you create your applications on the NetBeans Platform.

Now I've started looking at how to profile NetBeans Platform applications. And guess what? Big things are happening in this area of the NetBeans Platform. In the next days, I'll show one REALLY big enhancement in the NetBeans Profiler but, for now, I'll show how the integration between the NetBeans Profiler and the NetBeans Platform is handled. Start by comparing the two screenshots below:

Both are the result of running an 'empty' NetBeans Platform application, i.e., one generated from the template in NetBeans IDE. (In other words, I did not type a single character of code to create the above applications.) However, the lower one includes the memory toolbar and the Profiler button! Without any modules in the profiler cluster having been enabled. The above is all standard from the platform cluster, meaning that you can profile your application (i.e., start and stop the recording of a snapshot), which you can then open in the Profiler in NetBeans IDE. (Then, when you're ready for distribution, you can easily mask out those two toolbar elements so that they're not in your production code.)

Now is that cool or what.


Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2016