Ejemplo n.º 1
0
<html lang="en">
<head>
\t<title>Test headers</title>
\t<style type="text/css">
\t\tbody { background-color: lemonchiffon; }
\t\ttable { background-color: #fff; }
\t\ttr:nth-child(even) {background: #f1f1f1; }
\t\ttr:nth-child(odd) {background: #FFF; }
\t</style>
</head>
<body>
TAG;
            echo $str;
            echo "<table style='font-size:12px'><tr><th>Count</th><th>Vendor</th><th>Model</th><th>Platform</th><th>Platform Version</th><th>Browser</th><th>Browser Version</th><th>HTTP Headers</th></tr>";
        }
    }
    function footer()
    {
        if ($this->verbose) {
            echo "</body></table>";
            echo "<div style=\"color:#f00;\">Test Complete</div>";
        }
        $dps = $this->count / round($this->time, 4);
        $dps = round($dps, 0);
        echo "<h3>Elapsed time: " . round($this->time, 4) . "s, Total detections: {$this->count}, Detections per second: {$dps}</h3>\n\n";
    }
}
$test = new Benchmark($dataFile);
$test->header();
$test->flyThrough($hd);
$test->footer();