private function _createMap()
 {
     $out = "<map name=\"" . $this->mapName . "\">\n";
     $connection_rows = GetConnectionRows($this->requests->getRequests());
     $options = array('id' => $this->testInfo->getId(), 'path' => $this->testInfo->getRootDirectory(), 'run_id' => $this->stepResult->getRunNumber(), 'is_cached' => $this->stepResult->isCachedRun(), 'step_id' => $this->stepResult->getStepNumber(), 'use_cpu' => true, 'show_labels' => true, 'width' => 930);
     $map = GetWaterfallMap($connection_rows, $this->stepResult->readableIdentifier(), $options, $this->stepResult->getRawResults());
     $stepNumber = $this->stepResult->getStepNumber();
     foreach ($map as $entry) {
         if (array_key_exists('request', $entry)) {
             $index = $entry['request'] + 1;
             $title = "{$index}: " . htmlspecialchars($entry['url']);
             $out .= "<area href=\"#step{$stepNumber}_request{$index}\" alt=\"{$title}\" title=\"{$title}\" shape=RECT coords=\"{$entry['left']},{$entry['top']},{$entry['right']},{$entry['bottom']}\">\n";
         } elseif (array_key_exists('url', $entry)) {
             $out .= "<area href=\"#step{$stepNumber}_request\" alt=\"{$entry['url']}\" title=\"{$entry['url']}\" shape=RECT coords=\"{$entry['left']},{$entry['top']},{$entry['right']},{$entry['bottom']}\">\n";
         }
     }
     $out .= "</map>\n";
     return $out;
 }
Beispiel #2
0
                 </td>
             </tr>
             <tr>
                 <td>
                     <div id="tableRequestsRv_div" style="width: 100%;"></div>
                 </td>
                 <td>
                     <div id="tableBytesRv_div" style="width: 100%;"></div>
                 </td>
             </tr>
         </table>
         <div style="text-align:center;">
         <h3 name="connection">Connection View (Repeat View)</h3>
         <map name="connection_map_rv">
         <?php 
 $connection_rows = GetConnectionRows($requestsFv, $summary);
 $options = array('id' => $id, 'path' => $testPath, 'run_id' => $run, 'is_cached' => $cached, 'use_cpu' => true, 'show_labels' => true, 'is_mime' => $mime);
 $map = GetWaterfallMap($connection_rows, $url, $options, $pageData);
 foreach ($map as $entry) {
     if ($entry['request'] !== NULL) {
         $index = $entry['request'] + 1;
         $title = $index . ': ' . $entry['url'];
         echo '<area href="#request' . $index . '" alt="' . $title . '" title="' . $title . '" shape=RECT coords="' . $entry['left'] . ',' . $entry['top'] . ',' . $entry['right'] . ',' . $entry['bottom'] . '">' . "\n";
     } else {
         echo '<area href="#request" alt="' . $entry['url'] . '" title="' . $entry['url'] . '" shape=RECT coords="' . $entry['left'] . ',' . $entry['top'] . ',' . $entry['right'] . ',' . $entry['bottom'] . '">' . "\n";
     }
 }
 ?>
         </map>
         <table border="1" cellpadding="2px" cellspacing="0" style="width:auto; font-size:11px; margin-left:auto; margin-right:auto;">
             <tr>
Beispiel #3
0
$show_labels = !isset($_REQUEST['labels']) || $_REQUEST['labels'] != 0;
$rowcount = array_key_exists('rowcount', $_REQUEST) ? $_REQUEST['rowcount'] : 0;
// Get all of the requests;
$is_secure = false;
$has_locations = false;
$use_location_check = false;
if (!isset($requests)) {
    $requests = getRequests($id, $testPath, $run, $cached, $is_secure, $has_locations, $use_location_check);
} else {
    // not multisteps enabled
    $requests = $requests[$run][$cached];
    fixRequests($requests, $id, $testPath, $run, $cached, $is_secure, $has_locations, $use_location_check);
}
if (@$_REQUEST['type'] == 'connection') {
    $is_state = true;
    $rows = GetConnectionRows($requests, $show_labels);
} else {
    $rows = GetRequestRows($requests, $use_dots, $show_labels);
}
$page_events = GetPageEvents($page_data);
$bwIn = 0;
if (isset($test) && array_key_exists('testinfo', $test) && array_key_exists('bwIn', $test['testinfo'])) {
    $bwIn = $test['testinfo']['bwIn'];
} else {
    if (isset($test) && array_key_exists('test', $test) && array_key_exists('bwIn', $test['test'])) {
        $bwIn = $test['test']['bwIn'];
    }
}
$options = array('id' => $id, 'path' => $testPath, 'run_id' => $run, 'is_cached' => $cached, 'use_cpu' => !isset($_REQUEST['cpu']) || $_REQUEST['cpu'] != 0, 'use_bw' => !isset($_REQUEST['bw']) || $_REQUEST['bw'] != 0, 'show_labels' => $show_labels, 'max_bw' => $bwIn, 'is_mime' => $is_mime, 'is_state' => $is_state, 'rowcount' => $rowcount);
$im = GetWaterfallImage($rows, $url, $page_events, $options, $page_data);
// Spit the image out to the browser.
}
?>
                    </tr>
                </table>
                <br>
                <?php 
InsertWaterfall($url, $requests, $id, $run, $cached, $data);
echo "<br><a href=\"/customWaterfall.php?width=930&test={$id}&run={$run}&cached={$cached}\">customize waterfall</a> &#8226; ";
echo "<a id=\"view-images\" href=\"/pageimages.php?test={$id}&run={$run}&cached={$cached}\">View all Images</a>";
?>
                <br>
                <br>
                <h3 name="connection_view">Connection View</h3>
                <map name="connection_map">
                <?php 
$connection_rows = GetConnectionRows($requests);
$options = array('id' => $id, 'path' => $testPath, 'run_id' => $run, 'is_cached' => (bool) @$_GET['cached'], 'use_cpu' => true, 'show_labels' => true, 'width' => 930);
$map = GetWaterfallMap($connection_rows, $url, $options, $data);
foreach ($map as $entry) {
    if (array_key_exists('request', $entry)) {
        $index = $entry['request'] + 1;
        $title = "{$index}: " . htmlspecialchars($entry['url']);
        echo "<area href=\"#request{$index}\" alt=\"{$title}\" title=\"{$title}\" shape=RECT coords=\"{$entry['left']},{$entry['top']},{$entry['right']},{$entry['bottom']}\">\n";
    } elseif (array_key_exists('url', $entry)) {
        echo "<area href=\"#request\" alt=\"{$entry['url']}\" title=\"{$entry['url']}\" shape=RECT coords=\"{$entry['left']},{$entry['top']},{$entry['right']},{$entry['bottom']}\">\n";
    }
}
?>
                </map>
                <table border="1" bordercolor="silver" cellpadding="2px" cellspacing="0" style="width:auto; font-size:11px; margin-left:auto; margin-right:auto;">
                    <tr>