04-27-2013, 01:30 AM
I noticed a parse error in some filmstrip comparison :
http://www.webpagetest.org/video/compare...be8eb358d9
In this page, one of the test seems to have an empty value, so the JS generating the graphs is failing.
Here is a simple fix, in video/compare.php :
A better fix would be to know why for some tests data is missing
http://www.webpagetest.org/video/compare...be8eb358d9
In this page, one of the test seems to have an empty value, so the JS generating the graphs is failing.
Code:
dataTimes.setValue(0, 0, 'Visually Complete');
dataTimes.setValue(0, 1, 7400);
dataTimes.setValue(0, 2, 11000);
dataTimes.setValue(0, 3, 13000);
dataTimes.setValue(0, 4, 6600);
dataTimes.setValue(0, 5, );
Here is a simple fix, in video/compare.php :
PHP Code:
foreach($timeMetrics as $metric => $label) {
echo "dataTimes.setValue($row, 0, '$label');\n";
$column = 1;
foreach($tests as &$test) {
$val = $test['pageData'][$test['run']][$test['cached']][$metric];
if(!empty($val))
echo 'dataTimes.setValue('.$row.', '.$column.', '. $val .');'.PHP_EOL;
$column++;
}
$row++;
}
echo "dataRequests.setValue(0, 0, 'Total');\n";
echo "dataBytes.setValue(0, 0, 'Total');\n";
$column = 1;
foreach($tests as &$test) {
$val = $test['pageData'][$test['run']][$test['cached']]['requests'];
if(!empty($val))
echo "dataRequests.setValue(0, $column, ".$val.');'.PHP_EOL;
$val = $test['pageData'][$test['run']][$test['cached']]['bytesIn'];
if(!empty($val))
echo "dataBytes.setValue(0, $column, ".$val.');'.PHP_EOL;
$column++;
}
$row = 1;
foreach($mimeTypes as $mimeType) {
echo "dataRequests.setValue($row, 0, '$mimeType');\n";
echo "dataBytes.setValue($row, 0, '$mimeType');\n";
$column = 1;
foreach($tests as &$test) {
$val = $test['breakdown'][$mimeType]['requests'];
if(!empty($val))
echo "dataRequests.setValue($row, $column, ".$val.');'.PHP_EOL;
$val = $test['breakdown'][$mimeType]['bytes'];
if(!empty($val))
echo "dataBytes.setValue($row, $column, ".$val.');'.PHP_EOL;
$column++;
}
$row++;
}
A better fix would be to know why for some tests data is missing
