How Application Startup Duration is Measured
uberAgent measures the startup duration of every process. This happens fully automatically whenever an application is launched and does not require configuration per application. A high-level overview of this feature can be found here.
How Not to Do it
uberAgent does not monitor application startup duration by waiting for specific windows to show up on the screen. Such an approach would be difficult to implement reliably because applications often display splash screens or other helper windows while starting up in order to reduce perceived launch times. A reliable mechanism would have to ignore those and wait for the main application window.
Additionally, even when the main window is shown, it may not be fully populated, the content might be missing.
Summing up, this would be hard to get right and would most likely require configuration per application, something we are trying very hard to avoid.
Windows processes need to load DLLs in order to access operating system APIs or call functions from their own libraries. When a new process is created, it loads many DLLs in quick succession during its initialization phase. Once the process is ready, the DLL loading stops.
uberAgent monitors the DLL loading phase of new processes closely. The end of that phase is determined by looking for the first 30 second time window in which no DLLs are loaded.
Additionally, if there are IO operations during the DLL loading phase, uberAgent calculates the average IOPS during that phase and waits until IOPS drop to less than 20% for at least 10 seconds after the end of the DLL loading phase.
When those conditions are met uberAgent considers the process to be fully started up. Both of these timeout values can be adjusted globally or per-process if required, by the way. Take look at the section ProcessStartupDurationWaitIntervalOverride of the configuration file.
DLL Loading and Disk IO
DLLs are only loaded from disk the first time around. When a process is started a second time most or all DLLs will already be in the operating system’s file system cache. This optimization often effectively reduces the number of disk IOs incurred by a process start to zero.
uberAgent’s startup duration algorithm works correctly regardless of whether DLLs are loaded from disk or from RAM (the file system cache).
Because uberAgent reports the number of disk IOs per process startup the data it collects can be used to easily determine how efficient the caching mechanism is.
“Visual” Startup Duration
uberAgent’s algorithm for determining process and application startup durations is reliable and produces consistent results. However, it may not always correlate 100% with the duration as perceived by the end-user. The reason for this potential discrepancy is that uberAgent does not monitor what happens on the screen.