summaryrefslogtreecommitdiffstats
path: root/kstartperf/README
blob: ff9864446b316e502227b31876ff1307e3fbee21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

** 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 stores the current time with microsecond resolution in an 
   environment variable ($KSTARTPERF).
2. Kstartperf executes the requested application, but with a LD_PRELOAD
   library that overrides the X11 XMapWindow() function.
3. As soon as the app calls XMapWindow (this is the point where we assume
   that the app has "started up"), our function is called instead of the
   original XMapWindow(). This function calculates the time difference 
   between the current time and the time stored in the environment variable 
   and prints this information to standard error. 
4. Our function disables itself and calls the original XMapWindow().

** Notes

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

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