public function run($iterations = 1000) { $profiler = new Benchmark_Profiler(true); foreach ($this->tests as $test) { $method = 'config' . $test; $args = $this->{$method}(); $method = 'run' . $test; $profiler->enterSection($test); for ($i = 0; $i < $iterations; $i++) { call_user_func_array(array($this, $method), $args); } $profiler->leaveSection($test); } $profiler->stop(); $profiler->display(); }
require "main.php"; //var_dump(mysql::query('UPDATE bikes SET front_page_time = "2012-10-13" WHERE id =965')); die; if (DEBUG_SITE == 1) { // время выполнения скрипта require_once 'plagin/Benchmark/Profiler.php'; global $profiler; $profiler = new Benchmark_Profiler(TRUE); $profiler->start(); // время $profiler->enterSection('head'); } // выводим заголовки echo head1(); if (DEBUG_SITE == 1) { // время $profiler->leaveSection('head'); } unset($_SESSION['GLOBAL_MESSAGE']); if (!isset($_SESSION['currency'])) { $_SESSION['currency'] = SHOW_CURRENCY; } if (!isset($_GET['action'])) { $_GET['action'] = "index"; } // echo('<pre>'); // print_r($_GET); // print_r($_SERVER); // проверяем на КЕШ /* * если у нас есть закешированная страница - выводим ее * иначе генерим и создаем кеш страницу