|
@@ -5,14 +5,18 @@
|
|
|
|
|
|
require_once dirname(__FILE__).'/once.php.inc';
|
|
require_once dirname(__FILE__).'/once.php.inc';
|
|
|
|
|
|
-// Read number of queries to run from URL parameter
|
|
|
|
-$query_count = 1;
|
|
|
|
-if (!empty($_GET['queries'])) {
|
|
|
|
- $query_count = intval($_GET['queries']);
|
|
|
|
-}
|
|
|
|
|
|
+function main() {
|
|
|
|
+ // Read number of queries to run from URL parameter
|
|
|
|
+ $query_count = 1;
|
|
|
|
+ if (!empty($_GET['queries'])) {
|
|
|
|
+ $query_count = intval($_GET['queries']);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Fix the queries limits
|
|
|
|
+ $query_count = $query_count < 1 ? 1 : ($query_count > 500 ? 500 : $query_count);
|
|
|
|
|
|
-// Fix the queries limits
|
|
|
|
-$query_count = $query_count < 1 ? 1 : ($query_count > 500 ? 500 : $query_count);
|
|
|
|
|
|
+ $b = new Benchmark();
|
|
|
|
+ $b->bench_queries($query_count);
|
|
|
|
+}
|
|
|
|
|
|
-$b = new Benchmark();
|
|
|
|
-$b->bench_queries($query_count);
|
|
|
|
|
|
+main();
|