public function benchmarkCount($count = 1000) { $result = new BenchmarkResult(BenchmarkResult::TYPE_COUNT); foreach ($this->loadedFunctions as $id => $func) { $start = microtime(true); for ($i = 0; $i < $count; $i++) { call_user_func($func[1]); } $end = microtime(true); $result->addRow($func[0], $end - $start); } return $result; }
function clear() { BenchmarkResult::clear(); $this->benchResults = array(); $this->compareResults = array(); }