PageRenderTime 57ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/tests5/index.php

https://github.com/SimonSimCity/PhpSpeed
PHP | 159 lines | 137 code | 22 blank | 0 comment | 0 complexity | 18907c95aa618f100f02fc1d026c2639 MD5 | raw file
  1. <?php
  2. include "../config_db.php";
  3. ?>
  4. <!DOCTYPE html>
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head>
  7. <title>PHPspeed | <?php echo $_SERVER['HTTP_HOST']; ?></title>
  8. <meta http-equiv="content-language" content="en-us" />
  9. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  10. <link rel="start" title="Home" href="http://www.phpspeed.com/" />
  11. </head>
  12. <body>
  13. <header>
  14. <h1>PHPspeed | <?php echo $_SERVER['HTTP_HOST']; ?></h1>
  15. </header>
  16. <div id="navigation">
  17. <ul>
  18. <li><a href="/">&raquo; Home</a></li>
  19. <li><a href="/">&raquo; View Results</a></li>
  20. <li><a href="/">&raquo; PHP Info</a></li>
  21. <li><a href="/">&raquo; MySQL Info</a></li>
  22. <li><a href="/">&raquo; System Info</a></li>
  23. </ul>
  24. </div>
  25. <div id="wrapper">
  26. <div id="content-wrapper">
  27. <div id="content">
  28. <h2>PHP Benchmark</h2>
  29. <dl>
  30. <dt>Benchmark #1</dt>
  31. <dd>
  32. <b>Synthetic PHP BenchMark:</b>&nbsp;
  33. This set of benchmarks is designed to test various functions within PHP. The tests are
  34. each run multiple times and the average of each, along with the total is
  35. saved to your results database. <a href="/">&raquo; Start Test</a>
  36. </dd>
  37. <dt>Benchmark #2</dt>
  38. <dd>
  39. <b>Synthetic MySQL BenchMark:</b>&nbsp;
  40. This set of benchmarks will measure the speed of MySQL through the performance of several
  41. DB reads and writes using MySQL's built in benchmark features. It will also test your connection
  42. speed to the MySQL database. <a href="/">&raquo; Start Test</a>
  43. </dd>
  44. <dt>Benchmark #3</dt>
  45. <dd>
  46. <b>Synthetic Read/Write BenchMark:</b>&nbsp;
  47. PHPSpeed reads and writes multiple lines of data to a txt file to test the
  48. read and write speed of PHP. This is a good way to validate if system wide tweaks are improving
  49. the read and write speed of your server. <a href="/">&raquo; Start Test</a>
  50. </dd>
  51. <dt>Benchmark #4</dt>
  52. <dd>
  53. <b>Real World PHP BenchMark:</b>&nbsp;
  54. This benchmark measures the load time of 4 PHP pages of various sizes. There are no DB calls, this
  55. test will measure the real world time for someone to load a PHP page on your server.
  56. <a href="/">&raquo; Start Test</a>
  57. </dd>
  58. <dt>Benchmark #5</dt>
  59. <dd>
  60. <b>Real World PHP & MySQL BenchMark:</b>&nbsp;
  61. This benchmark measures the time to load 4 PHP pages WITH MySQL DB calls. MySQL cacheing will positively affect
  62. the outcome of this test. You can measure the benefit of cacheing by running the test with cacheing enabled and
  63. disabled. <a href="/">&raquo; Start Test</a>
  64. </dd>
  65. <dt>Benchmark #6</dt>
  66. <dd>
  67. <b>Find out your PHPspeed!</b>&nbsp;
  68. This is our all-in-one benchmark that will use sections of all of the above tests to give you a thorough
  69. indication of the speed of your server. Compare your PHPspeed to other webmasters with similar configurations
  70. to determine if you are maximizing your performance. <a href="/">&raquo; Start Test</a>
  71. </dd>
  72. </dl>
  73. </div>
  74. </div>
  75. <div id="sidebar-wrapper">
  76. <div id="sidebar">
  77. <h3>Server Time</h3>
  78. <ul>
  79. <li><b>SERVER TIME:</b><br />
  80. <?php echo date("g:i a : l"); ?><br />
  81. <?php echo date("F d, Y"); ?></li>
  82. </ul>
  83. <?php
  84. $con = mysql_connect($dbhost,$dbuname,$dbpass) or die("Cant connect to MySQL");
  85. mysql_select_db($dbname) or die('Could not select database');
  86. $sql = "SELECT * FROM phpspeed_config";
  87. $result = mysql_query($sql,$con);
  88. $ver = mysql_fetch_assoc($result);
  89. mysql_close($con);
  90. ?>
  91. <h3>Version Info</h3>
  92. <ul>
  93. <li>PHP: <b><?php echo phpversion(); ?></b></li>
  94. <li>MySQL: <b><?php printf(mysql_get_server_info()); ?></b></li>
  95. <li><?php echo $_SERVER['SERVER_SOFTWARE']; ?></li>
  96. <li>PHPspeed: <b><?php echo $ver['version']; ?></b></li>
  97. </ul>
  98. <h3>PHPspeed Stats</h3>
  99. <ul>
  100. <li>Tests Run:</li>
  101. <li>Last Test:</li>
  102. </ul>
  103. </div>
  104. </div>
  105. </div>
  106. </body>
  107. </html>