2

How to measure Eclipse's boot duration, ie. time Eclipse takes to start?

With "Boot duration" being:

  1. from time eclipse or eclipse.exe command is executed
  2. to time Eclipse UI is started and available (approximately when user can use mouse, menus, and editors)

In a Bash Shell, I have tested the time command, but, it does not reply until ~/path/to/eclipse/eclipse process is closed / killed.

~$ time ~/path/to/eclipse/eclipse
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
[...] truncated
16:12:32,920 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@4df07ddd - Registering current configuration as safe fallback point
^ here I closed Eclipse UI

real    0m11.724s
user    0m35.608s
sys 0m0.868s

How to achieve this?

Edit:

Background / initial goal

  1. compare Eclipse boot durations between different Eclipse configurations (eclipse.ini). (See How can you speed up Eclipse?)
  2. See what impact does have a configuration change on Eclipse boot time

Note: currently running Eclipse on Ubuntu. Any advice for Windows or Linux platform is welcome.

el-teedee
  • 1,293
  • 1
  • 15
  • 27
  • Use a stop watch. Seriously. – Stephen C Sep 16 '18 at 12:00
  • Thank for the tips, but I had something a little more precise in mind ;) and that could be easily repeated (to compute an average for example). Currently working on this based on logs parsing – el-teedee Sep 16 '18 at 12:15
  • Well, the reason I said use a stop watch is that I don't think you will find anything better. Or at least, not without modifying Eclipse. – Stephen C Sep 16 '18 at 12:21

1 Answers1

1

There is a built-in solution that Vogel described here : https://www.vogella.com/tutorials/EclipsePerformance/article.html#using-the-build-in-tracing-facilities-of-eclipse

The gist is to set a few preferences in a file .options you put in your eclipse installation folder :

# turn on debugging for the org.eclipse.core plugin.
org.eclipse.osgi/debug=true
# turn on execution time of the activator for the plug-ins
org.eclipse.osgi/debug/bundleTime=true
# turn on total execution time of the plug-ins
org.eclipse.osgi/debug/bundleStartTime=true

Then start Eclipse via the following command line.

./eclipse -debug

Then he even gives a nice set of small scripts that help decipher the trace. It measures from the osgi component the startup time/activation time of everyone.

Yann TM
  • 1,942
  • 13
  • 22