1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-07 11:28:21 +03:00
ifhub.club/index.php

86 lines
2.2 KiB
PHP
Raw Normal View History

<?php
2008-09-21 09:36:57 +03:00
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
//error_reporting(E_ALL);
2008-09-21 09:36:57 +03:00
ini_set('display_errors', 1);
define('LS_VERSION','0.3.1');
define('SYS_HACKER_CONSOLE',false);
2008-09-21 09:36:57 +03:00
header('Content-Type: text/html; charset=utf-8');
$t1=microtime(true);
set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__));
chdir(dirname(__FILE__));
// Получаем объект конфигурации
require_once("./config/loader.php");
require_once(Config::Get('path.root.engine')."/classes/Engine.class.php");
2009-07-26 16:43:16 +03:00
$oProfiler=ProfilerSimple::getInstance(Config::Get('path.server.root').'/logs/profiler.log',false);
2009-07-26 16:43:16 +03:00
$iTimeId=$oProfiler->Start('full_time');
2008-09-21 09:36:57 +03:00
$oRouter=Router::getInstance();
$oRouter->Exec();
2009-07-26 16:43:16 +03:00
$oEngine=Engine::getInstance();
$aStats=$oEngine->getStats();
2008-09-21 09:36:57 +03:00
$t2=microtime(true);
2009-07-26 16:43:16 +03:00
$oProfiler->Stop($iTimeId);
2008-09-21 09:36:57 +03:00
?>
2009-05-11 17:48:04 +03:00
<?php
2008-09-21 09:36:57 +03:00
$oUser=$oRouter->User_GetUserCurrent();
2008-11-05 00:12:48 +02:00
if (Router::GetIsShowStats() and $oUser and $oUser->isAdministrator()) {
2008-09-21 09:36:57 +03:00
?>
<fieldset>
2009-05-11 11:20:55 +03:00
<legend>Statistics performance</legend>
2008-09-21 09:36:57 +03:00
<table>
<tr align="top">
<td align="top">
<ul>
<li>
<b>MySql</b> <br>
2009-05-11 11:20:55 +03:00
&nbsp;&nbsp;&nbsp;query: <?echo($aStats['sql']['count']);?><br>
&nbsp;&nbsp;&nbsp;time: <?echo($aStats['sql']['time']);?><br><br><br>
2008-09-21 09:36:57 +03:00
</li>
</ul>
</td>
<td>
<ul>
<li>
<b>Cache</b> <br>
2009-05-11 11:20:55 +03:00
&nbsp;&nbsp;&nbsp;query: <?echo($aStats['cache']['count']);?><br>
2008-09-21 09:36:57 +03:00
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set: <?echo($aStats['cache']['count_set']);?><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get: <?echo($aStats['cache']['count_get']);?><br>
2009-05-11 11:20:55 +03:00
&nbsp;&nbsp;&nbsp;time: <?echo(round($aStats['cache']['time'],5));?>
2008-09-21 09:36:57 +03:00
</li>
</ul>
</td>
<td align="top">
<ul>
<li>
<b>PHP</b> <br>
2009-05-11 11:20:55 +03:00
&nbsp;&nbsp;&nbsp;time load modules:<?echo($aStats['engine']['time_load_module']);?><br>
&nbsp;&nbsp;&nbsp;full time:<?echo(round($t2-$t1,3));?><br><br><br>
2008-09-21 09:36:57 +03:00
</li>
</ul>
</td>
</tr>
</table>
</fieldset>
<?php }?>