Or my pain with the Eclipse Profiling package.
My task for today – find a performance problem with our Eclipse application. Rather than use the sampling profiler built-in in to the VM (-hprof option) I wanted to use a more accurate tracing profiler. So my painful journey began.
- Find the Eclipse Test and Performance Tools Platform website (https://www.eclipse.org/tptp/)
- TPTP website hides the installation instructions – however Google found them here (https://www.eclipse.org/tptp/home/downloads/installguide/InstallGuide42.html)
- Using the update site (https://eclipse.org/tptp/updates/site.xml) recommend in the installation instructions, try to find the features. It’s slow, insanely slow.
- From 4.2.1 select the Tracing and Profiling package – get warned of errors because I don’t have all required plugins
- Use the Select required – get errors because it can’t find the required EMF dependency (among others)
- Now try the manual steps (https://www.eclipse.org/tptp/home/downloads/installguide/InstallGuide42.html#install_manual) of getting the All TPTP file
(https://www.eclipse.org/downloads/download.php?file=/tptp/4.2.0/TPTP-4.2.0-200606190100A/tptp.runtime-TPTP-4.2.0.zip) from an Eclipse download site. Hint don’t choose the main site it’s slow, try anything else (I used Indiana). - Unzip the download files in your eclipse directory.
- Restart Eclipse
- Now I get the option to Analyze my code (a static analysis tool – like PMD. BTW why the duplication of effort?), but no “Profile As…” item in my toolbar/context menus (https://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html)
– what gives? Now I suspect that the right components were always on my disk I just didn’t know how to activate them. - Now I’ve got a copy of TPTP 4.2.x installed maybe I can retry the update site and find a missing feature. But no joy just more wasted time.
- Off to try a commercial profiler for a few days. At least I will get a trial version that does the job.
- Tried YourKit profile v5.5 (https://www.yourkit.com/overview/index.jsp) – it installs quickly and easily.
- But when I try to profile a SWT application it dies. A quick glance at the release notes suggests that I need the YourKit Beta 6 (https://www.yourkit.com/eap/index.jsp#change_list) to profile SWT applications.
- Next problem getting proper trace information requires Java 1.5 (we develop against ancient and creaky 1.4.x).
- Finally after 3 hours I’m actually profiling an app.
- YourKit is having some problems too (https://forums.yourkit.com/viewtopic.php?t=767) I can only get the CPU sampling not tracing to work. In the end I’ve only succeeded in getting a graphical version of hprof (with better stack traces).
Does anyone else think this completely insane? Does anyone from the TPTP project care?
Update: What I would like from the TPTP people at Eclipse:
- An Update mechanism that knows how to get emf.core and the other missing plug-ins or
- Change the installation instructions to include a description of the dependancies. and
- Include instructions on how to activate the profiler et al. once its installed.
Or you could *pay* for an IDE like IntelliJ which has hundreds of code intention features which may have pointed to problematic code while developing.
Additionally, ever heard of System.currentTimeMillis()? You can use this and simple logging to monitor start/end times of methods. This can help pinpoint problematic code.
If this is a web app then checkout glassbox which provides a monitoring service for the running app. Also check https://www.appperfect.com/products/index.html which has an IntelliJ plugin.
Tried the JRockit Runtime Analyzer? (https://e-docs.bea.com/jrockit/tools/usingjra/jra.html)
I am sorry you had this experience with TPTP. The install experience is something we have been focused on recently. The download page has been redone to make it easier for end users, but it still needs a few more things done to it.
We have focused on an update manager based solution around the Callisto packaging which will take care of all your dependencies. The update mgr path has been slow lately as have been all the Eclipse web sites due to volume but that is being addressed.
Our download page was shaped for eclipse developers to use and still assumes you know to put things in the plug-in dir etc.. We will fix this for more general download as you suggest.
The TPTP profiler does support older JVM which are still in heavy use as well as remote server configurations. I hope you found your problems.
I also hope you will give TPTP another try, If you have problems feel free to send me a note directly or post to the mailing list or newsgroup.
Do people on the TPTP project care? Sure, I do. I’ve bugzilla-ed that our InstallGuide tells people the LEAST likely way to make TPTP work.
First, what is your Eclipse release you’re building on? Hopefully 3.2+… If so, then I’d suggest starting back there (3.2, or better 3.2.1). Then just use the “Callisto train” to get the stuff that works together. Go to the Help => Software Updates => Find new components to install… Then select the Callisto Discovery Site as the site to update form. When you check the Tracing and Profiling and “Select Required”, you’ll not only have it pick up the right pieces, it will actually find them as well.
E-mail me if you run into further problems. I’ll try to check back, but might miss something if I forget. Your blog made our PMC mailing list, so others on the TPTP team *DO* care as well.
—
RDS
Dan – we’re developing an Eclipse RCP app so we can’t use Intelli-J or other tool. In addition the performance problem wasn’t a programming error that Intelli-J might have pointed out.
Yes System.currentTimeMillis() would’ve helped, but so would Java’s builtin profiler (-hprof). I was looking for a tool that was a step up from the bare minimum. A tool that would help me spot the worst performing methods in a few minutes so I could spend my time analysing my performance problem, not trying to diagnose it. What struck me as so ironic was the amount of time I wasted trying to get TPTP running. An experience echoed by others on my team.
Finally since this an RCP app and not a web app glassbox isn’t of much help – but thanks for the heads up.
Staffan – I’ve not tried JRocket – I will try it next time I’m in need.
Harm and Randy – Thanks for the replies – I was fairly sure that people on TPTP team do care, but having been ignored on the mailing list I got frustrated, especially with what appeared to be such a simple problem.
I will try a clean install of 3.2.1 after the Holidays and we will go from there.
Thanks again for taking the time to help.