示例#1
0
文件: Unit.php 项目: nochso/benchmark
 private function notifyText($text = null)
 {
     if ($this->progress !== null) {
         $this->progress->text($text);
     }
 }
示例#2
0
 /**
  * Runs all units and creates a HTML report.
  */
 public function run()
 {
     Out::writeLine('nochso/benchmark ' . self::BENCHMARK_VERSION);
     Out::writeLine();
     $duration = -microtime(true);
     $progress = new Progress();
     $progress->prepareUnitList($this->unitList);
     foreach ($this->unitList as $unitName => $unit) {
         $unit->setProgress($progress);
         $unit->run();
     }
     $duration += microtime(true);
     $data = array('report' => $this, 'title' => $this->getTitle(), 'duration' => $duration, 'min_duration' => Timer::$defaultMinDuration, 'os' => php_uname('s') . ' ' . php_uname('r') . php_uname('m'), 'zend_extensions' => get_loaded_extensions(true));
     $this->render($data);
 }