Test the speed of your processor
| Model | CPU | RAM | Hard drive | Seconds to finish | |
|---|---|---|---|---|---|
| Unknown Debian Lenny | Unknown | 414mb | unknown | 0.04241 | Debian 5 PHP 5 |
| Dell Latitude E6510 | i7-620m 2.66ghz | 8gb | 256gb ssd | 0.02202 | Windows 7 Cygwin PHP 5 |
| MacBook Pro, 15 inch | 2.2ghz | 2gb | 7200rpm 120gb | 0.05 | Snow Leopard PHP 5 |
| Dell Optiplex GX620 | Intel Pentium(R) D 2.99ghz | 3.5gb | 7200rpm 250gb 3.0g sata | 0.06 | Ubuntu 10.04 PHP 5 |
| Dell Optiplex GX620 | Intel Pentium(R) D 2.99ghz | 3.5gb | 7200rpm 250gb 3.0g sata | 0.1253 | Ubuntu 11.10 PHP 5 |
| eMachine T6520 | AMD64 3400+ | 2gb 3.0gb SATA | 7200rpm 750gb 3.0g sata | 0.15 | Ubuntu 10.04 PHP 5 |
<?php
/**
* Version 0.1
*/
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function speed_test()
{
$num_loops = 100;
for($j=0;$j<$num_loops;$j++)
{
system("clear");
print <<<eof
#
# Test {$j}/{$num_loops}
#
eof;
$page_load_start = getmicrotime();
for($i=0;$i<500000;$i++)
{
continue;
}
$page_load_end = getmicrotime();
$a_load_time[] = round($page_load_end - $page_load_start,3);
}
return array_sum($a_load_time) / $num_loops; #> average load time
}
$page_load_time = speed_test();
system("clear");
print <<<eof
#
# Average Load Time = {$page_load_time} seconds.
#
eof;
?>
/**
* Version 0.1
*/
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function speed_test()
{
$num_loops = 100;
for($j=0;$j<$num_loops;$j++)
{
system("clear");
print <<<eof
#
# Test {$j}/{$num_loops}
#
eof;
$page_load_start = getmicrotime();
for($i=0;$i<500000;$i++)
{
continue;
}
$page_load_end = getmicrotime();
$a_load_time[] = round($page_load_end - $page_load_start,3);
}
return array_sum($a_load_time) / $num_loops; #> average load time
}
$page_load_time = speed_test();
system("clear");
print <<<eof
#
# Average Load Time = {$page_load_time} seconds.
#
eof;
?>
Test processor speed version 0.2
Still implementing - this is the same as the previous version.
| Model | CPU | RAM | Hard drive | Seconds to finish |
|---|
<?php
/**
* Version 0.2
*/
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function speed_test()
{
$num_loops = 100;
for($j=0;$j<$num_loops;$j++)
{
system("clear");
print <<<eof
#
# Test {$j}/{$num_loops}
#
eof;
$page_load_start = getmicrotime();
for($i=0;$i<500000;$i++)
{
continue;
}
$page_load_end = getmicrotime();
$a_load_time[] = round($page_load_end - $page_load_start,3);
}
return array_sum($a_load_time) / $num_loops; #> average load time
}
$page_load_time = speed_test();
system("clear");
print <<<eof
#
# Average Load Time = {$page_load_time} seconds.
#
eof;
?>
/**
* Version 0.2
*/
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function speed_test()
{
$num_loops = 100;
for($j=0;$j<$num_loops;$j++)
{
system("clear");
print <<<eof
#
# Test {$j}/{$num_loops}
#
eof;
$page_load_start = getmicrotime();
for($i=0;$i<500000;$i++)
{
continue;
}
$page_load_end = getmicrotime();
$a_load_time[] = round($page_load_end - $page_load_start,3);
}
return array_sum($a_load_time) / $num_loops; #> average load time
}
$page_load_time = speed_test();
system("clear");
print <<<eof
#
# Average Load Time = {$page_load_time} seconds.
#
eof;
?>
[Click to add or edit comments])
Please prepend comments below including a date