Git Product home page Git Product logo

phpspeed's Introduction

PHPspeed v1.0 BETA 
http://www.phpspeed.com
  
MANUAL SETUP INSTRUCTIONS
--------------------------------------------------------------------------------
1) Create a new MySQL DB (you might call it phpspeed)
2) Import the included phpspeed.sql file to create the tables
3) Copy the config_db.tpl.php file to config_db.php and update the database connection data
4) You will need to remove the INSTALL folder and all contents
5) CHMOD the 'test3' folder to 777 for the read/write test
6) Load the index.php file to start benchmarking
--------------------------------------------------------------------------------

WEB BASED INSTALLATION
--------------------------------------------------------------------------------
1) Upload the entire phpspeed folder to a web accessible folder on your server
2) Navigate to the folder through a web browser (ex.. http://www.yoursite.com/phpspeed/)
3) Follow the install instructions provided
4) Delete the install folder
5) CHMOD the 'test3' folder to 777 for the read/write test
6) Load the index.php file to start benchmarking
--------------------------------------------------------------------------------

Notes from the author:
--------------------------------------------------------------------------------
You have downloaded our BETA offering of PHPspeed.  While we have tested on our 
servers extensively, it is impossible to predict how the script will act on 
different configurations.  Please proceed with caution and report any bugs to 
us using the BUG TRACKER at http://www.phpspeed.com.
--------------------------------------------------------------------------------
For any questions or installation problems, please visit http://www.phpspeed.com .

That's it!  Enjoy this script.

phpspeed's People

Contributors

kenjis avatar simonsimcity avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

inode64 kenjis

phpspeed's Issues

FreeBSD warnings

Warning: file(/proc/cpuinfo) [function.file]: failed to open stream: No such file or directory

/proc/cpuinfo isn't there on FreeBSD, but I'm guessing this isn't strictly needed for the tests to run either.

flush not compatible with php 5.3 or Chrome

diff -ruN htdocs.old//inc/functions.server.php htdocs/inc/functions.server.php
--- htdocs.old//inc/functions.server.php        2011-09-12 23:53:06.286286059 +0200
+++ htdocs/inc/functions.server.php     2011-09-12 23:53:17.675286141 +0200
@@ -94,4 +94,20 @@
 $cac_mem = ($cache_mem/1024);
 $sha_mem = ($shared_mem/1024);

+function buffer_flush(){
+
+    echo str_pad('', 512);
+    echo '<!-- -->';
+
+    if(ob_get_length()){
+
+        @ob_flush();
+        @flush();
+        @ob_end_flush();
+
+    }
+
+    @ob_start();
+}
+
 ?>
diff -ruN htdocs.old//runtests2.php htdocs/runtests2.php
--- htdocs.old//runtests2.php   2011-09-12 23:11:03.000000000 +0200
+++ htdocs/runtests2.php        2011-09-12 23:53:47.967287208 +0200
@@ -93,7 +93,6 @@
 ignore_user_abort(TRUE);
 error_reporting(E_ALL);
 set_time_limit(0);
-ob_implicit_flush(1);

 define('CSV_SEP', ',');
 define('CSV_NL', "\n");
@@ -146,7 +145,7 @@

                        $GLOBAL_TEST_FUNC = $func;
                        echo "<b>" . sprintf('%34s', $func) . "</b> ... \t";
-                       flush();
+                       buffer_flush();
                        list($usec, $sec) = explode(' ', microtime());
                        $GLOBAL_TEST_START_TIME = $usec + $sec;
                }
@@ -197,7 +196,7 @@
                                }
                                $test_name = $matches[1];
                                include_once($tests_dir . '/' . $entry);
-                               flush();
+                               buffer_flush();
                                if (!function_exists($test_name . '_enabled')) {
                                        echo 'INVALID !' . "\n";
                                        continue;
diff -ruN htdocs.old//runtests3.php htdocs/runtests3.php
--- htdocs.old//runtests3.php   2011-09-12 23:11:03.000000000 +0200
+++ htdocs/runtests3.php        2011-09-12 23:53:57.786291156 +0200
@@ -93,7 +93,6 @@
 ignore_user_abort(TRUE);
 error_reporting(E_ALL);
 set_time_limit(0);
-ob_implicit_flush(1);

 define('CSV_SEP', ',');
 define('CSV_NL', "\n");
@@ -143,7 +142,7 @@

                        $GLOBAL_TEST_FUNC = $func;
                        echo "<b>" . sprintf('%34s', $func) . "</b> ... \t";
-                       flush();
+                       buffer_flush();
                        list($usec, $sec) = explode(' ', microtime());
                        $GLOBAL_TEST_START_TIME = $usec + $sec;
                }
@@ -194,7 +193,7 @@
                                }
                                $test_name = $matches[1];
                                include_once($tests_dir . '/' . $entry);
-                               flush();
+                               buffer_flush();
                                if (!function_exists($test_name . '_enabled')) {
                                        echo 'INVALID !' . "\n";
                                        continue;
diff -ruN htdocs.old//runtests4.php htdocs/runtests4.php
--- htdocs.old//runtests4.php   2011-09-12 23:11:03.000000000 +0200
+++ htdocs/runtests4.php        2011-09-12 23:54:08.037286038 +0200
@@ -93,7 +93,6 @@
 ignore_user_abort(TRUE);
 error_reporting(E_ALL);
 set_time_limit(0);
-ob_implicit_flush(1);

 define('CSV_SEP', ',');
 define('CSV_NL', "\n");
@@ -145,7 +144,7 @@

                        $GLOBAL_TEST_FUNC = $func;
                        echo "<b>" . sprintf('%34s', $func) . "</b> ... \t";
-                       flush();
+                       buffer_flush();
                        list($usec, $sec) = explode(' ', microtime());
                        $GLOBAL_TEST_START_TIME = $usec + $sec;
                }
@@ -196,7 +195,7 @@
                                }
                                $test_name = $matches[1];
                                include_once($tests_dir . '/' . $entry);
-                               flush();
+                               buffer_flush();
                                if (!function_exists($test_name . '_enabled')) {
                                        echo 'INVALID !' . "\n";
                                        continue;
diff -ruN htdocs.old//runtests5.php htdocs/runtests5.php
--- htdocs.old//runtests5.php   2011-09-12 23:11:03.000000000 +0200
+++ htdocs/runtests5.php        2011-09-12 23:54:18.256286470 +0200
@@ -93,7 +93,6 @@
 ignore_user_abort(TRUE);
 error_reporting(E_ALL);
 set_time_limit(0);
-ob_implicit_flush(1);

 define('CSV_SEP', ',');
 define('CSV_NL', "\n");
@@ -145,7 +144,7 @@

                        $GLOBAL_TEST_FUNC = $func;
                        echo "<b>" . sprintf('%34s', $func) . "</b> ... \t";
-                       flush();
+                       buffer_flush();
                        list($usec, $sec) = explode(' ', microtime());
                        $GLOBAL_TEST_START_TIME = $usec + $sec;
                }
@@ -196,7 +195,7 @@
                                }
                                $test_name = $matches[1];
                                include_once($tests_dir . '/' . $entry);
-                               flush();
+                               buffer_flush();
                                if (!function_exists($test_name . '_enabled')) {
                                        echo 'INVALID !' . "\n";
                                        continue;
diff -ruN htdocs.old//runtests.php htdocs/runtests.php
--- htdocs.old//runtests.php    2011-09-12 23:11:03.000000000 +0200
+++ htdocs/runtests.php 2011-09-12 23:51:25.456285603 +0200
@@ -89,7 +89,6 @@
 ignore_user_abort(TRUE);
 error_reporting(E_ALL);
 set_time_limit(0);
-ob_implicit_flush(1);

 define('CSV_SEP', ',');
 define('CSV_NL', "\n");
@@ -146,7 +145,7 @@

                        $GLOBAL_TEST_FUNC = $func;
                        echo "<b>" . sprintf('%34s', $func) . "</b> ... \t";
-                       flush();
+                       buffer_flush();
                        list($usec, $sec) = explode(' ', microtime());
                        $GLOBAL_TEST_START_TIME = $usec + $sec;
                }
@@ -197,7 +196,7 @@
                                }
                                $test_name = $matches[1];
                                include_once($tests_dir . '/' . $entry);
-                               flush();
+                               buffer_flush();
                                if (!function_exists($test_name . '_enabled')) {
                                        echo 'INVALID !' . "\n";
                                        continue;

remove test_egrep

egrep is deprecated in php 5.3, if you compare 5.2 and 5.3 the test is not equal

percona mysql

I get very very poor results with using phpspeed with a Percona Mysql.
The DB is configured fine but I thing the tests are not made for Percona at all

Support for php 5.3

  • Remove split
  • initialize variables and remove empty variables
  • Add sharemem "Shmen"

--- inc/functions.server.php.old 2011-09-12 23:11:03.000000000 +0200
+++ inc/functions.server.php 2011-09-12 23:29:49.246286609 +0200
@@ -23,8 +23,10 @@

//Display CPU information
$cpuinfo = file("/proc/cpuinfo");
+$total_cpu=0;
for ($i = 0; $i < count($cpuinfo); $i++) {

  •           list($item, $data) = split(":", $cpuinfo[$i], 2);
    
  •   if (trim($cpuinfo[$i]) != "") {
    
  •           list($item, $data) = explode(":", $cpuinfo[$i], 2);
            $item = chop($item);
            $data = chop($data);
            if ($item == "processor") {
    
    @@ -39,6 +41,7 @@
    }
    if ($item == "cache size") { $cache = $data;}
    if ($item == "bogomips") { $bogomips = $data;}
  •   }
    
    }
    if($found_cpu != "yes") { $cpu_info .= " unknown"; }
    $cpu_info .= " MHz\n";
    @@ -53,7 +56,7 @@
    //THIS PROVIDES MEMORY INFO
    $meminfo = file("/proc/meminfo");
    for ($i = 0; $i < count($meminfo); $i++) {
  •           list($item, $data) = split(":", $meminfo[$i], 2);
    
  •           list($item, $data) = explode(":", $meminfo[$i], 2);
            $item = chop($item);
            $data = chop($data);
            if ($item == "MemTotal") { $total_mem =$data;   }
    
    @@ -63,6 +66,7 @@
    if ($item == "Buffers") { $buffer_mem = $data; }
    if ($item == "Cached") { $cache_mem = $data; }
    if ($item == "MemShared") {$shared_mem = $data; }
  •           if ($item == "Shmem") {$shared_mem = $data; }
    
    }
    $used_mem = ( $total_mem - $free_mem );
    $used_swap = ( $total_swap - $free_swap );

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.