WebPagetest Forums
gaps in waterfalls - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: gaps in waterfalls (/showthread.php?tid=12754)

gaps in waterfalls - nilskuhn - 01-14-2014 12:32 AM

if I test an HTTPS-site I am getting gaps in entries of waterfall-presentation when test with IE version 10:
If I export HTTP-archive and show same waterfall in online-har-viewer (http://www.softwareishard.com/har/viewer/) the waterfall looks correct.
Tests with urlblast look correct, too:
Regards, Nils

RE: gaps in waterfalls - cws - 01-15-2014 01:43 AM

We figured out that the gaps are created in the method "FixUpRequestTimes" (from object_detail.inc file).

The elder version of the agent (wptdriver 130) generates waterfall images without gaps since it uses the fields "ssl_ms", "connect_ms" and "dsl_ms" to calculate the timings. The timings are calculated backwards from the request field "load_start" since the fields "ssl_start", "connect_start" and "dns_start" are not set and therefore $start is zero:

foreach (array('ssl', 'connect', 'dns') as $key) {
   $start = $end = $ms = 0;
   if (array_key_exists($key . '_start', $req))
       $start = $req[$key . '_start'];
   if ($start == 0) {
      // Compute start for old-style timing.
      $start = $all_start - $ms;
      $end = $start + $ms;

In the new version of the agent (wptdriver 153) the "_start" and "_end" fields are set and the timings are calculated using these fields. Later on "ttfb_start" is set to the value of "load_start". However, "ssl_end" isn't equal to "load_start" and the value of "ttfb_start" is greater than "ssl_end". Thus, a gap is rendered between "ssl_end" and "ttfb_start":

$req['ttfb_start'] = $req['load_start'];

Unfortunately, we weren't able to figure out how the correct rendering should be?

We inferred some possiblilities how the correct result could look like:
1. The start of dns lookup, ssl negotiation etc. are correct but Time To First Byte is rendered too late.
2. The start of ttfb is correct and dns lookup, ssl negotiation etc. have to be rendered later.
3. The start of dns lookup, ssl negotiation etc. and the start of ttfb are correct but Time To First Byte have to last longer to fill the gap.

Do you have an idea which is the right solution for fixing this bug?

RE: gaps in waterfalls - pmeenan - 01-15-2014 04:20 AM

The correct rendering is with the gaps. Modern browsers can pre-connect (and resolve) before they actually make the request. The HAR spec (and the older WPT implementation) assumed that the dns and connect immediately preceded the request.

RE: gaps in waterfalls - pmeenan - 01-15-2014 04:22 AM

btw, there may be something specific to IE 10 where part of the SSL negotiation isn't being measured. From the looks of the waterfalls, the SSL negotiation is only 1 RTT and it should likely be higher.

RE: gaps in waterfalls - nilskuhn - 01-15-2014 06:03 PM

Thanks a lot for the information about pre-connections, that's very interesting!