Exemplo n.º 1
0
        // loop through all  of the results files (one per run) - both cached and uncached
        if ($hasCSV) {
            echo "{$header},\"Run\",\"Cached\"";
            if (!$is_requests) {
                echo ',"Speed Index"';
            }
            echo "\r\n";
            for ($i = 1; $i <= $test['test']['runs']; $i++) {
                $additional = array($i, 0);
                if (!$is_requests) {
                    $additional[] = SpeedIndex($testPath, $i, 0);
                }
                csvFile("{$testPath}/{$i}_{$fileType}", null, $column_count, $additional);
                $additional = array($i, 1);
                if (!$is_requests) {
                    $additional[] = SpeedIndex($testPath, $i, 1);
                }
                csvFile("{$testPath}/{$i}_Cached_{$fileType}", null, $column_count, $additional);
            }
        } else {
            csvPageData($id, $testPath, $test['test']['runs']);
        }
    }
    printResult();
} else {
    header("HTTP/1.0 404 Not Found");
}
function csvPageData($id, $testPath, $runs)
{
    if ($_GET['requests']) {
        for ($i = 1; $i <= $runs; $i++) {
Exemplo n.º 2
0
        if ($hasCSV) {
            echo "{$header},\"Run\",\"Cached\"";
            if (!$is_requests) {
                echo ',"Speed Index"';
            }
            echo "\r\n";
            $testInfo = GetTestInfo($testPath);
            for ($i = 1; $i <= $test['test']['runs']; $i++) {
                $additional = array($i, 0);
                if (!$is_requests) {
                    $additional[] = SpeedIndex($testPath, $i, 0, $testInfo);
                }
                csvFile("{$testPath}/{$i}_{$fileType}", null, $column_count, $additional);
                $additional = array($i, 1);
                if (!$is_requests) {
                    $additional[] = SpeedIndex($testPath, $i, 1, $testInfo);
                }
                csvFile("{$testPath}/{$i}_Cached_{$fileType}", null, $column_count, $additional);
            }
        } else {
            csvPageData($id, $testPath, $test['test']['runs']);
        }
    }
    printResult();
} else {
    header("HTTP/1.0 404 Not Found");
}
function csvPageData($id, $testPath, $runs)
{
    if ($_GET['requests']) {
        for ($i = 1; $i <= $runs; $i++) {
Exemplo n.º 3
0
        if ($files && is_array($files) && count($files)) {
            $hasCSV = true;
        } else {
            $hasCSV = false;
        }
        // loop through all  of the results files (one per run) - both cached and uncached
        if ($hasCSV) {
            echo "{$header},\"Run\"";
            if (!$is_requests) {
                echo ',"Speed Index"';
            }
            echo "\r\n";
            for ($i = 1; $i <= $test['test']['runs']; $i++) {
                $additional = array($i, SpeedIndex($testPath, $i, 0));
                csvFile("{$testPath}/{$i}_{$fileType}", null, $column_count, $additional);
                $additional = array($i, SpeedIndex($testPath, $i, 1));
                csvFile("{$testPath}/{$i}_Cached_{$fileType}", null, $column_count, $additional);
            }
        } else {
            csvPageData($id, $testPath, $test['test']['runs']);
        }
    }
} else {
    header("HTTP/1.0 404 Not Found");
}
function csvPageData($id, $testPath, $runs)
{
    if ($_GET['requests']) {
        for ($i = 1; $i <= $runs; $i++) {
            for ($cached = 0; $cached <= 1; $cached++) {
                $requests = getRequests($id, $testPath, $i, $cached, $secure, $loc, false);