<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>188620</bug_id>
          
          <creation_ts>2018-08-15 14:16:33 -0700</creation_ts>
          <short_desc>Navigation Timing API reporting below 0 for response time (responseEnd - responseStart)</short_desc>
          <delta_ts>2018-08-28 14:54:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 11</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>msartintarm</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1450462</commentid>
    <comment_count>0</comment_count>
    <who name="">msartintarm</who>
    <bug_when>2018-08-15 14:16:33 -0700</bug_when>
    <thetext>I work on a site with millions of hits per day. We collect latency data and make assertions on the results client-side before using them in aggregate metrics.

We are receiving invalid metrics from the Safari browser for various iPhone / iPad devices using iOS 10 and 11.

The following interval is showing up as below 0 in many instances:

`performance.timing.responseEnd - performance.timing.responseStart`

In some cases the number is significantly below 0. It doesn&apos;t seem like it would ever make sense for this number to be below 0.

We collect samples of performance.timing data for which these errors occur. Here is a sample where responseEnd - responseStart is -28412:

{&quot;navigationStart&quot;:1534229958311,&quot;unloadEventStart&quot;:0,&quot;unloadEventEnd&quot;:0,&quot;redirectStart&quot;:0,&quot;redirectEnd&quot;:0,&quot;fetchStart&quot;:1534229958311,&quot;domainLookupStart&quot;:1534229958311,&quot;domainLookupEnd&quot;:1534229958311,&quot;connectStart&quot;:1534229958311,&quot;connectEnd&quot;:1534229958311,&quot;secureConnectionStart&quot;:0,&quot;requestStart&quot;:1534229958313,&quot;responseStart&quot;:1534229958435,&quot;responseEnd&quot;:1534229930023,&quot;domLoading&quot;:1534229958326,&quot;domInteractive&quot;:1534229958585,&quot;domContentLoadedEventStart&quot;:1534229958585,&quot;domContentLoadedEventEnd&quot;:1534229958585,&quot;domComplete&quot;:1534229961509,&quot;loadEventStart&quot;:1534229961510,&quot;loadEventEnd&quot;:1534229961510}


	sub_family: &quot;AppleWebKit&quot;
	platform: &quot;iPad&quot;
	device: &quot;iPad&quot;
	os: &quot;CPU OS 10_3_3 like Mac OS X&quot;
	browser: &quot;Safari&quot;
	browser_version: &quot;10.0&quot;
	browser_engine_version: &quot;603.3.8&quot;

Let me know if there is any additional analysis / info I can attach that would be helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1450464</commentid>
    <comment_count>1</comment_count>
    <who name="">msartintarm</who>
    <bug_when>2018-08-15 14:18:10 -0700</bug_when>
    <thetext>This does not appears to be occuring with high frequency in browsers other than Safari / devices other than iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1451282</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-08-17 16:54:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/43445161&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1454563</commentid>
    <comment_count>3</comment_count>
    <who name="">msartintarm</who>
    <bug_when>2018-08-28 14:54:17 -0700</bug_when>
    <thetext>I have determined that it is iPads with the latest versions of iOS which are throwing this error.

I found this out by analyzing our metrics and segmenting them per user agent. 

Around 50% (!) of reports from iPads using iOS 10.0 and 11.0 are throwing this error. This is across millions of daily hits.. basically each browser session on iPad has a 50% chance of reporting responseStart / responseEnd numbers which are invalid.

I do not see any other iOS device throwing errors at a rate of above 0.5%.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>