Пример #1
0
 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);
         }
     }
 }
Пример #2
0
 public static function sameDir($dir1, $dir2)
 {
     return BashInterpreter::normalizeDir($dir1) == BashInterpreter::normalizeDir($dir2);
 }
Пример #3
0
 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));
 }