Exemple #1
0
function genForm($curLabel = "", $curSlice = "")
{
    global $gArchive;
    $selectRun = selectArchiveLabel($gArchive, $curLabel, true, false);
    $selectSlice = selectSlice($curSlice);
    $sForm = <<<OUTPUT
<table cellpadding=0 cellspacing=0 border=0>
  <tr>
    <td> <label>Choose a run:</label> </td>
\t<td> {$selectRun} </td>
    <td></td>
  </tr>

  <tr>
\t<td> <label>Choose URLs:</label> </td>
\t<td> {$selectSlice} </td>
    <td>
      <input type=submit value="Get Charts">
    </td>
  </tr>
</table>
OUTPUT;
    return $sForm;
}
Exemple #2
0
<?php 
echo uiHeader($gTitle);
?>

<div style="float:right; margin-right: 10em;">
<a href="about.php#bigquery">Write your own custom queries!</a>
</div>

<h1>Trends</h1>


<form>
<div>
	<label>Choose URLs:</label>
<?php 
echo selectSlice($gSlice, "", "s");
?>

<label style="margin-left: 1em;">Start:</label>
	<?php 
echo selectArchiveLabel($gArchive, minLabel(), false, false, "minlabel");
?>

<label style="margin-left: 1em;">End:</label>
	<?php 
echo selectArchiveLabel($gArchive, maxLabel(), false, false, "maxlabel");
?>
<input style="margin-left: 1em;" class=button type=submit value="Submit">
</div>
</form>
<span style="margin-left: 20px;">New feature: <a href="compare.php">Compare two runs</a></span>
</p>

<div style="float: left; margin-right: 20px;">
<form>
	<label>Choose a run:</label>
	<?php 
echo selectArchiveLabel($gArchive, $gLabel);
?>
</form>
</div>

<form>
	<label>Choose URLs:</label>
<?php 
echo selectSlice($gSlice, "onchange='document.location=\"?a={$gArchive}&l={$gLabel}&s=\"+escape(this.options[this.selectedIndex].value)'");
?>
</form>

<div id=interesting style="margin-top: 40px;">
<?php 
require_once "stats.inc";
require_once "charts.inc";
$hStats = getStats($gLabel, $gSlice, curDevice());
$hCdf = getCdfData($gLabel, $gSlice, curDevice());
echo bytesContentTypeChart($hStats) . "\n";
echo responseSizes($hStats) . "\n";
echo histogram($hCdf, "bytesHtmlDoc", "HTML Document Transfer Size", "bytesHtmlDoc", 5 * 1024) . "\n";
echo histogram($hCdf, "numDomElements", "# of DOM Elements per Page", "numDomElements", 400, 2) . "\n";
echo percentGoogleLibrariesAPI($hStats) . "\n";
echo percentFlash($hStats) . "\n";