handleRequest($method, $uri); if ($res !== true) { echo "Failed to handle request for $uri\n"; exit(1); } if ($i !== 0 && $i % ($interval) === 0) echoMemoryAndTime($i, $start); } echo "Time: " . Color::cyan(number_format(microtime(true) - $start, 10) . " s\n"); // echo the average time per request echo "Avg/lookup: " . Color::yellow(number_format((microtime(true) - $start) / $iterations, 10) . " s\n"); echo "\n"; } echoTitle("Starting blog lookups"); runIterations(100000, $b, $blog); runIterations(1000000, $b, $blog); echoTitle("Starting github lookups"); runIterations(10000, $g, $github); runIterations(100000, $g, $github); runIterations(1000000, $g, $github); echoTitle("Starting big lookups"); runIterations(10000, $big, $bigRoutes); runIterations(100000, $big, $bigRoutes); runIterations(1000000, $big, $bigRoutes); exit(0);