Example #1
0
 /**
  * Plots the graph for all added tests.
  *
  * @param bool $keepAlive
  */
 public function run($keepAlive = false)
 {
     for ($r = 1; $r <= $this->repetitions; ++$r) {
         foreach ($this->input as $i) {
             foreach ($this->tests as $index => $test) {
                 $this->bench($test, $i, $index);
             }
             $this->output->update($this->aggregator, $i);
         }
     }
     $this->output->finalize($this->aggregator, $i);
     if ($keepAlive) {
         // Wait for user input to close
         echo 'Press enter to quit.';
         fgets(STDIN);
     }
 }