Bug 188620 - Navigation Timing API reporting below 0 for response time (responseEnd - responseStart)
Summary: Navigation Timing API reporting below 0 for response time (responseEnd - resp...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 11
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-15 14:16 PDT by msartintarm
Modified: 2018-08-28 14:54 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description msartintarm 2018-08-15 14:16:33 PDT
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'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:

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


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

Let me know if there is any additional analysis / info I can attach that would be helpful.
Comment 1 msartintarm 2018-08-15 14:18:10 PDT
This does not appears to be occuring with high frequency in browsers other than Safari / devices other than iOS.
Comment 2 Radar WebKit Bug Importer 2018-08-17 16:54:13 PDT
<rdar://problem/43445161>
Comment 3 msartintarm 2018-08-28 14:54:17 PDT
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%.