-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
35 lines (29 loc) · 1.28 KB
/
index.php
File metadata and controls
35 lines (29 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// Засекаем время
$time_start = microtime(true);
require_once 'config/config.php';
require_once 'classes/Func.php';
require_once 'classes/System.php';
require_once 'classes/SiteView.php';
$site = new SiteView();
echo $site->display();
// Отладочная информация
if(DEBUG_MODE)
{
$time_end = microtime(true);
$exec_time = $time_end-$time_start;
$debug = "время генерации: ".round($exec_time, 5)." seconds\r\n";
if(function_exists('memory_get_peak_usage')) $debug .= "memory peak usage: ".number_format(memory_get_peak_usage())." bytes\r\n";
$debug .= "шаблонов: ".$site->tpl->get_num_templates()."\r\n";
$debug .= "запросов к базе: ".$site->db->get_num_queries()."\r\n";
$debug .= "скрытых инклудов: ".System::$num_includs;
if(USE_CACHE) {
$cahe_info = $site->cache->GetStats();
$cahe_info_str = "время: ".round($cahe_info['time'], 5)." seconds\r\n";
$cahe_info_str .= "обращений к кешу: ".$cahe_info['count']."\r\n";
$cahe_info_str .= "чтений из кеша: ".$cahe_info['count_get']."\r\n";
$cahe_info_str .= "записей в кеш: ".$cahe_info['count_set'];
Debug_HackerConsole_Main::out($cahe_info_str, "Cache");
}
Debug_HackerConsole_Main::out($debug, "Summary");
}