Test the speed of your processor

ModelCPURAMHard driveSeconds to finish
Unknown Debian LennyUnknown414mbunknown0.04241Debian 5 PHP 5
Dell Latitude E6510i7-620m 2.66ghz8gb256gb ssd0.02202Windows 7 Cygwin PHP 5
MacBook Pro, 15 inch2.2ghz2gb7200rpm 120gb0.05Snow Leopard PHP 5
Dell Optiplex GX620Intel Pentium(R) D 2.99ghz3.5gb7200rpm 250gb 3.0g sata0.06Ubuntu 10.04 PHP 5
Dell Optiplex GX620Intel Pentium(R) D 2.99ghz3.5gb7200rpm 250gb 3.0g sata0.1253Ubuntu 11.10 PHP 5
eMachine T6520AMD64 3400+2gb 3.0gb SATA7200rpm 750gb 3.0g sata0.15Ubuntu 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
;
?>

Test processor speed version 0.2

Still implementing - this is the same as the previous version.

ModelCPURAMHard driveSeconds 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
;
?>

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.