praveenbankbazaar / httparchive

Automatically exported from code.google.com/p/httparchive
0 stars 0 forks source link

pageFromHar collects the wrong value? #370

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Not sure if this is a bug but it looks like it might be. I've been backporting 
the recent changes to my fork. The following looks like it will always be NULL.

// Copy some properties buried deep in the JSON structure to the top.
$page['onContentLoaded'] = ( array_key_exists('onContentLoaded', 
$page['pageTimings']) ? $page['pageTimings']['onContentLoaded'] : NULL );

From the files I've looked at 'onContentLoaded' doesn't exist but there is 
'oncContentLoad'

Original issue reported on code.google.com by charlie....@clark-consulting.eu on 21 Feb 2013 at 9:52

GoogleCodeExporter commented 9 years ago
Please specify the code file you're referencing and the HAR URL(s) you 
examined. Thanks.

Original comment by stevesou...@gmail.com on 21 Feb 2013 at 11:55

GoogleCodeExporter commented 9 years ago
Sorry,

http://code.google.com/p/httparchive/source/browse/trunk/pages.inc#69 

Any page should do, e.g. 
http://www.httparchive.org/viewsite.php?pageid=6468057
which links to
http://httparchive.webpagetest.org/export.php?test=130215_2_1ZDC&run=3&cached=0

For the purposes of this table I would have thought using the CSV object data 
might be better but the metrics don't seem to align.

Original comment by charlie....@clark-consulting.eu on 22 Feb 2013 at 9:14

GoogleCodeExporter commented 9 years ago
Got it. Right now WPT doesn't report onContentLoad, so it'll always be null. 
But this fix is needed in the event it *does* start getting reported. I changed 
the logic to match what's collected in batch_lib.inc (since there are multiple 
locations for some timing data in HAR files). 

Original comment by stevesou...@gmail.com on 22 Feb 2013 at 6:21