private function optimize() { $commands = BashInterpreter::matchCommand($this->task, "python execute.py"); foreach ($commands as $command) { // Any execute without benchmarks don't need to get run. if (count(BashInterpreter::matchFlag($command, "-b")) == 0) { $this->task = BashInterpreter::removeCommand($this->task, $command); } } }
public static function sameDir($dir1, $dir2) { return BashInterpreter::normalizeDir($dir1) == BashInterpreter::normalizeDir($dir2); }
public function benchmarks() { $benchmarks = array(); $commands = BashInterpreter::matchCommand($this->task, "python execute.py"); foreach ($commands as $command) { $benchmark_matches = BashInterpreter::matchFlag($command, "-b"); foreach ($benchmark_matches as $match) { $benchmarks[] = $match; } } return array_values(array_unique($benchmarks)); }