Beispiel #1
0
 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();
 }
Beispiel #2
0
*/
if (DEBUG_SITE == 1) {
    // время
    $profiler->enterSection('echo');
}
// создаем КЕШ сайта
if (USE_KEH == 1) {
    create_keh($_str);
}
// генерим статику
$_statik = array('phone' => mysql::query_findpole('select zna from config where id=30', 'zna'), 'skype' => mysql::query_findpole('select zna from config where id=31', 'zna'), 'email' => mysql::query_findpole('select zna from config where id=32', 'zna'), 'icq' => mysql::query_findpole('select zna from config where id=33', 'zna'), 'rejim' => mysql::query_findpole('select zna from config where id=34', 'zna'), 'rejim1' => mysql::query_findpole('select zna from config where id=35', 'zna'), 'rejim2' => mysql::query_findpole('select zna from config where id=36', 'zna'), 'rejim3' => mysql::query_findpole('select zna from config where id=37', 'zna'), 'brand_at_first' => mysql::query_findpole('select zna from config where id=40', 'zna'), 'news_at_first' => mysql::query_findpole('select zna from config where id=46', 'zna'), 'lider_at_first' => mysql::query_findpole('select zna from config where id=39', 'zna'), 'novinki_at_first' => mysql::query_findpole('select zna from config where id=38', 'zna'), 'specpredlogenie_at_first' => mysql::query_findpole('select zna from config where id=41', 'zna'));
echo system::show_tpl(array('str' => $_str, 'statik' => $_statik), 'index_full.php');
// *******************************************************
if (DEBUG_SITE == 1) {
    // время
    $profiler->leaveSection('echo');
}
// вывод/невывод дебаггера
if (DEBUG_SITE == 1) {
    echo '<div id="debug" style="float: left; width: 100%; border: solid red 0px; background: #C0C0C0; ">';
    // время
    $profiler->stop();
    $profiler->display();
    // дебагер
    debug();
    echo "</div>";
}
// RSS
//require_once "classes/xml.class.php";
//do_xml();
//var_dump(mysql::query('select / ')); die;