コード例 #1
0
ファイル: debug_info.php プロジェクト: ASDAFF/open_bx
}

if ($bShowStat || $bShowCacheStat) //2
{
	$APPLICATION->arIncludeDebug[] = array(
		"PATH" => $APPLICATION->GetCurPage(),
		"QUERY_COUNT" => intval($GLOBALS["DB"]->cntQuery),
		"QUERY_TIME" => round($GLOBALS["DB"]->timeQuery, 4),
		"QUERIES" => $GLOBALS["DB"]->arQueryDebug,
		"TIME" => $main_exec_time,
	);

	//CJSPopup
	require_once($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/interface/admin_lib.php");

	$arCacheDebug = \Freetrix\Main\Diag\CacheTracker::getCacheTracking();
	if (!empty($arCacheDebug))
	{
		?>
		<script type="text/javascript">
			function sortTable(table_id, column_num, reverse)
			{
				var table = BX(table_id);
				var title = table.rows[0].cells[column_num].innerHTML;
				if (title.charCodeAt(0) == 8595)
					reverse = true;
				if (title.charCodeAt(0) == 8593)
					reverse = false;

				for (var i = 1; i < table.rows.length; i++)
				{
コード例 #2
0
ファイル: main.php プロジェクト: ASDAFF/open_bx
 function Stop($rel_path = "", $path = "", $cache_type = "")
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION;
     /** @global CDatabase $DB */
     global $DB;
     /** @global int $CACHE_STAT_BYTES */
     global $CACHE_STAT_BYTES;
     if ($this->is_comp) {
         self::$level--;
     }
     $this->arResult = array("PATH" => $path, "REL_PATH" => $rel_path, "QUERY_COUNT" => 0, "QUERY_TIME" => 0, "QUERIES" => array(), "TIME" => getmicrotime() - $this->start_time, "FX_STATE" => $GLOBALS["FX_STATE"], "CACHE_TYPE" => $cache_type, "CACHE_SIZE" => \Freetrix\Main\Data\Cache::getShowCacheStat() ? \Freetrix\Main\Diag\CacheTracker::getCacheStatBytes() : 0, "LEVEL" => self::$level);
     if ($DB->ShowSqlStat) {
         if ($DB->cntQuery) {
             $this->arResult["QUERY_COUNT"] = $DB->cntQuery;
             $this->arResult["QUERY_TIME"] = $DB->timeQuery;
             $this->arResult["QUERIES"] = $DB->arQueryDebug;
         }
         $DB->arQueryDebug = $this->arQueryDebugSave;
         $DB->cntQuery = $this->cnt_query;
         $DB->timeQuery = $this->query_time;
     }
     if (\Freetrix\Main\Data\Cache::getShowCacheStat()) {
         $this->arResult["CACHE"] = \Freetrix\Main\Diag\CacheTracker::getCacheTracking();
         \Freetrix\Main\Diag\CacheTracker::setCacheTracking($this->arCacheDebugSave);
         \Freetrix\Main\Diag\CacheTracker::setCacheStatBytes($CACHE_STAT_BYTES = $this->cache_size);
     }
 }