Exemplo n.º 1
0
 public function postProcessRun()
 {
     $testerError = null;
     $secure = false;
     $haveLocations = false;
     loadPageRunData($this->testRoot, $this->run, $this->cached);
     $steps = $this->countSteps();
     for ($i = 1; $i <= $steps; $i++) {
         $rootUrls = UrlGenerator::create(true, "", $this->id, $this->run, $this->cached, $i);
         $stepPaths = new TestPaths($this->testRoot, $this->run, $this->cached, $i);
         $requests = getRequestsForStep($stepPaths, $rootUrls, $secure, $haveLocations, true, true);
         if (isset($requests) && is_array($requests) && count($requests)) {
             getBreakdownForStep($stepPaths, $rootUrls, $requests);
         } else {
             $testerError = 'Missing Results';
         }
         if (is_dir(__DIR__ . '/../google') && is_file(__DIR__ . '/../google/google_lib.inc')) {
             require_once __DIR__ . '/../google/google_lib.inc';
             ParseCsiInfoForStep($stepPaths, true);
         }
         GetDevToolsCPUTimeForStep($stepPaths);
     }
     return $testerError;
 }
 /**
  * @param TestStepResult $stepResult
  * @param int $tableColumns Number of columsn in the table
  * @return string The created markup
  */
 private function _createBreakdownRow($stepResult, $tableColumns)
 {
     $urlGenerator = $stepResult->createUrlGenerator("", FRIENDLY_URLS);
     $b = getBreakdownForStep($stepResult->createTestPaths(), $urlGenerator, $requests);
     if (is_array($b)) {
         $this->breakdown[] = array('run' => $stepResult->getRunNumber(), 'data' => $b);
     }
     $out = "<tr>\n";
     $out .= "<td align=\"left\" valign=\"middle\">\n";
     $breakdownUrl = $urlGenerator->resultPage("breakdown");
     $out .= "<a href=\"{$breakdownUrl}\">Content Breakdown</a>";
     $out .= "</td>";
     $span = $tableColumns - 1;
     $out .= "<td align=\"left\" valign=\"middle\" colspan=\"{$span}\">";
     $run = $stepResult->getRunNumber();
     $out .= "<table><tr><td style=\"border:none;\"><div id=\"requests_{$run}\"></div></td>";
     $out .= "<td style=\"border:none;\"><div id=\"bytes_{$run}\"></div></td></tr></table>";
     $out .= "</td>\n";
     $out .= "</tr>\n";
     return $out;
 }
Exemplo n.º 3
0
 public function getMimeTypeBreakdown()
 {
     // TODO: move implementation to this method
     $requests = null;
     return getBreakdownForStep($this->localPaths, $this->createUrlGenerator(""), $requests);
 }