Пример #1
0
 /**
  * Constructs a TestResults object by loading the information from result files
  * @param TestInfo $testInfo Test information used to load the data
  * @param FileHandler $fileHandler FileHandler to use
  * @param array $options Options to load the TestRunResults
  * @return TestResults The new instance
  */
 public static function fromFiles($testInfo, $fileHandler = null, $options = null)
 {
     $runResults = array();
     $numRuns = $testInfo->getRuns();
     $firstViewOnly = $testInfo->isFirstViewOnly();
     $testComplete = $testInfo->isComplete();
     for ($runNumber = 1; $runNumber <= $numRuns; $runNumber++) {
         if (!$testComplete && !$testInfo->isRunComplete($runNumber)) {
             continue;
         }
         $firstView = TestRunResults::fromFiles($testInfo, $runNumber, false, $fileHandler, $options);
         $repeatView = $firstViewOnly ? null : TestRunResults::fromFiles($testInfo, $runNumber, true, $fileHandler, $options);
         $runResults[] = array($firstView, $repeatView);
     }
     return new self($testInfo, $runResults, $fileHandler);
 }
Пример #2
0
<?php

include 'common.inc';
require_once __DIR__ . '/include/TestInfo.php';
require_once __DIR__ . '/include/TestPaths.php';
require_once __DIR__ . '/include/TestRunResults.php';
require_once __DIR__ . '/include/DomainBreakdownHtmlSnippet.php';
require_once __DIR__ . '/include/AccordionHtmlHelper.php';
$page_keywords = array('Domains', 'Webpagetest', 'Website Speed Test');
$page_description = "Website domain breakdown{$testLabel}";
$testInfo = TestInfo::fromFiles($testPath);
$firstViewResults = TestRunResults::fromFiles($testInfo, $run, false);
$isMultistep = $firstViewResults->countSteps() > 1;
$repeatViewResults = null;
if (!$testInfo->isFirstViewOnly()) {
    $repeatViewResults = TestRunResults::fromFiles($testInfo, $run, true);
}
if (array_key_exists('f', $_REQUEST) && $_REQUEST['f'] == 'json') {
    $domains = array('firstView' => $firstViewResults->getStepResult(1)->getJSFriendlyDomainBreakdown(true));
    if ($repeatViewResults) {
        $domains['repeatView'] = $repeatViewResults->getStepResult(1)->getJSFriendlyDomainBreakdown(true);
    }
    $output = array('domains' => $domains);
    json_response($output);
    exit;
}
?>


<!DOCTYPE html>
<html>
<?php

include __DIR__ . '/common.inc';
require_once __DIR__ . '/include/TestInfo.php';
require_once __DIR__ . '/include/TestRunResults.php';
require_once __DIR__ . '/optimization_detail.inc.php';
require_once __DIR__ . '/include/PerformanceOptimizationHtmlSnippet.php';
require_once __DIR__ . '/include/AccordionHtmlHelper.php';
$page_keywords = array('Optimization', 'Webpagetest', 'Website Speed Test', 'Page Speed');
$page_description = "Website performance optimization recommendations{$testLabel}.";
global $testPath, $run, $cached, $step;
// defined in common.inc
$testInfo = TestInfo::fromFiles($testPath);
$testRunResults = TestRunResults::fromFiles($testInfo, $run, $cached, $step);
$isMultistep = $testRunResults->countSteps() > 1;
?>
<!DOCTYPE html>
<html>
    <head>
        <title>WebPagetest Optimization Check Results<?php 
echo $testLabel;
?>
</title>
        <?php 
$gaTemplate = 'Optimization Check';
include 'head.inc';
?>
        <style type="text/css">
            td.nowrap {white-space:nowrap;}
            th.nowrap {white-space:nowrap;}
            tr.blank {height:2ex;}
Пример #4
0
require_once 'waterfall.inc';
require_once __DIR__ . '/include/TestInfo.php';
require_once __DIR__ . '/include/TestRunResults.php';
require_once __DIR__ . '/include/RunResultHtmlTable.php';
require_once __DIR__ . '/include/UserTimingHtmlTable.php';
require_once __DIR__ . '/include/WaterfallViewHtmlSnippet.php';
require_once __DIR__ . '/include/ConnectionViewHtmlSnippet.php';
require_once __DIR__ . '/include/RequestDetailsHtmlSnippet.php';
require_once __DIR__ . '/include/RequestHeadersHtmlSnippet.php';
require_once __DIR__ . '/include/AccordionHtmlHelper.php';
$options = null;
if (array_key_exists('end', $_REQUEST)) {
    $options = array('end' => $_REQUEST['end']);
}
$testInfo = TestInfo::fromFiles($testPath);
$testRunResults = TestRunResults::fromFiles($testInfo, $run, $cached, null, $options);
$data = loadPageRunData($testPath, $run, $cached, $options, $test['testinfo']);
$isMultistep = $testRunResults->countSteps() > 1;
$page_keywords = array('Performance Test', 'Details', 'Webpagetest', 'Website Speed Test', 'Page Speed');
$page_description = "Website performance test details{$testLabel}";
?>
<!DOCTYPE html>
<html>
    <head>
        <title>WebPagetest Test Details<?php 
echo $testLabel;
?>
</title>
        <?php 
$gaTemplate = 'Details';
include 'head.inc';
Пример #5
0
<?php

include __DIR__ . '/common.inc';
require_once __DIR__ . '/video.inc';
require_once __DIR__ . '/page_data.inc';
require_once __DIR__ . '/devtools.inc.php';
require_once __DIR__ . '/include/FileHandler.php';
require_once __DIR__ . '/include/TestPaths.php';
require_once __DIR__ . '/include/UrlGenerator.php';
require_once __DIR__ . '/include/TestInfo.php';
require_once __DIR__ . '/include/TestRunResults.php';
$fileHandler = new FileHandler();
$testInfo = TestInfo::fromFiles($testPath);
$testRunResults = TestRunResults::fromFiles($testInfo, $run, $cached, $fileHandler);
$page_keywords = array('Screen Shot', 'Webpagetest', 'Website Speed Test');
$page_description = "Website performance test screen shots{$testLabel}.";
$userImages = true;
?>
<!DOCTYPE html>
<html>
    <head>
        <title>WebPagetest Screen Shots<?php 
echo $testLabel;
?>
</title>
        <?php 
$gaTemplate = 'Screen Shot';
include 'head.inc';
?>
        <style type="text/css">
        img.center {