Order of requests in a page


#1

Hi,

I’m trying to find the best way to get order requests in a page by requestStart time. If I understand correctly, startedDateTime is in seconds granularity, so ordering by it will group together all css/js files requested in the first sec, for example. Is there a better field/way to get a more accurate ordering?

Thanks!


#2

This should give you the exact ordering:

SELECT 
  INTEGER(JSON_EXTRACT(payload, '$._number')) as number, 
  url
FROM [httparchive:har.2016_09_01_chrome_requests]
WHERE page = 'http://www.techcrunch.com/'
ORDER BY number ASC

Example result:


#3

I’m looking at the schema the field name should be startedDateTime ? it seems in seconds granularity, but is it possible to change to milliseconds granularity? I’m not only need the order of each request, but also want the time offset since page started loading, in a query would be SELECT pages.url, requests.url, requests.startedDateTime - pages.startedDateTime AS started, time AS duration FROM httparchive.... AS pages JOIN ... AS requests ON ... ORDER BY started ASC

https://bigquery.cloud.google.com/table/httparchive:runs.2016_09_01_requests

we know the HAR spec is already describing each timestamp in milliseconds, wonder the startedDateTime field in pages and requests can be changed to millisecond granularity?