コード例 #1
0
<?php

header("Content-type: image/png");
include 'common.inc';
include 'object_detail.inc';
include 'optimizationChecklist.inc';
require_once 'page_data.inc';
$pageData = loadPageRunData($testPath, $run, $cached);
// get all of the requests
$secure = false;
$haveLocations = false;
$requests = getRequests($id, $testPath, $run, $cached, $secure, $haveLocations, false);
$im = drawChecklist($url, $requests, $pageData);
// spit the image out to the browser
imagepng($im);
imagedestroy($im);
コード例 #2
0
ファイル: thumbnail.php プロジェクト: ceeaspb/webpagetest
/**
* Draw the checklist image
* 
* @param resource $img
*/
function tbnDrawChecklist(&$img)
{
    global $id;
    global $testPath;
    global $run;
    global $cached;
    global $url;
    include 'optimizationChecklist.inc';
    $is_secure = false;
    $has_locations = false;
    $requests = getRequests($id, $testPath, $run, $cached, $is_secure, $has_locations, false);
    $page_data = loadPageRunData($testPath, $run, $cached);
    $img = drawChecklist($url, $requests, $page_data);
    if (!$requests || !$page_data) {
        $failed = true;
    }
}
コード例 #3
0
ファイル: thumbnail.php プロジェクト: lucasRolff/webpagetest
/**
* Draw the checklist image
*
* @param TestStepResult $testStepResult Step results to draw the waterfall for
* @param resource $img
*/
function tbnDrawChecklist($testStepResult, &$img)
{
    global $url;
    require_once __DIR__ . '/optimizationChecklist.inc';
    $requests = $testStepResult->getRequests();
    $img = drawChecklist($testStepResult->readableIdentifier($url), $requests, $testStepResult->getRawResults());
}
コード例 #4
0
<?php

header("Content-type: image/png");
include __DIR__ . '/common.inc';
require_once __DIR__ . '/optimizationChecklist.inc';
require_once __DIR__ . '/include/TestInfo.php';
require_once __DIR__ . '/include/TestStepResult.php';
// not functional, but to declare what to expect from common.inc
global $testPath, $run, $cached, $step, $id, $url, $test;
$testInfo = TestInfo::fromFiles($testPath);
$testStepResult = TestStepResult::fromFiles($testInfo, $run, $cached, $step);
$requests = $testStepResult->getRequests();
$im = drawChecklist($testStepResult->readableIdentifier($url), $requests, $testStepResult->getRawResults());
// spit the image out to the browser
imagepng($im);
imagedestroy($im);