
** kstartperf: startup time measurement for KDE apps **

** Usage: 

kstartperf measures startup time for KDE applications. Usage is simple:

    $ kstartperf konsole

will show you the startup time of konsole in milliseconds.


** How does it work?

1. kstartperf sets an environment variable (KSTARTPERF) to the current time. 
2. kstartperf executes the requested comand command with an LD_PRELOAD
   library which overrides XMapWindow.
3. As soon as the app calls XMapWindow (this is the point where we assume
   that the app has "started up"), the overrided function gets called which
   calculated the time difference between the current time and the time
   stored in the KSTARTPERF environment variable. This value is printed to
   standard error.
4. The overridden XMapWindow calls the original XMapWindow and everything
   else continues normally.

** Notes

The appliation that is being profiled, needs to be linked against kdecore.

Geert Jansen <jansen@kde.org>, 
20 July 2000
