function run($name, $cmdline_input) { // $cmdline_input = ""; // run the test very quickly global $prefix; $filename = "{$prefix}/{$name}.php"; // run it in php first $time = run_php($filename, $cmdline_input); print "PHP: {$name}: {$time}"; if ($time > 30 or $time < 20) { print " - Test outside time range\n"; } print "\n"; // run it with phc $time = run_phc($filename, $name, $cmdline_input); print "phc: {$name}: {$time}\n"; }
function run($name, $cmdline_input) { global $date; $filename = "{$name}.php"; // run it in php first $time = run_php($filename, $cmdline_input); print "PHP: " . basename($name) . ": {$time}"; print "\n"; $php_res = fopen("results/php_{$date}.txt", "a"); fwrite($php_res, basename($name) . " " . $time . "\n"); fclose($php_res); // run it with phc $time = run_phc($filename, $name, $cmdline_input); print "phc: " . basename($name) . ": {$time}\n"; $phc_res = fopen("results/phc_{$date}.txt", "a"); fwrite($phc_res, basename($name) . " " . $time . "\n"); fclose($phc_res); }