Example #1
0
 public 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, "BX_STATE" => $GLOBALS["BX_STATE"], "CACHE_TYPE" => $cache_type, "CACHE_SIZE" => \Bitrix\Main\Data\Cache::getShowCacheStat() ? \Bitrix\Main\Diag\CacheTracker::getCacheStatBytes() : 0, "LEVEL" => self::$level);
     if ($this->savedTracker) {
         $application = \Bitrix\Main\Application::getInstance();
         $connection = $application->getConnection();
         $sqlTracker = $connection->getTracker();
         if ($sqlTracker->getCounter() > 0) {
             $this->arResult["QUERY_COUNT"] = $sqlTracker->getCounter();
             $this->arResult["QUERY_TIME"] = $sqlTracker->getTime();
             $this->arResult["QUERIES"] = $sqlTracker->getQueries();
         }
         $connection->setTracker($this->savedTracker);
         $DB->sqlTracker = $connection->getTracker();
         $this->savedTracker = null;
     }
     if (\Bitrix\Main\Data\Cache::getShowCacheStat()) {
         $this->arResult["CACHE"] = \Bitrix\Main\Diag\CacheTracker::getCacheTracking();
         \Bitrix\Main\Diag\CacheTracker::setCacheTracking($this->arCacheDebugSave);
         \Bitrix\Main\Diag\CacheTracker::setCacheStatBytes($CACHE_STAT_BYTES = $this->cache_size);
     }
 }
Example #2
0
    ?>
</p>
	<p><?php 
    echo GetMessage("debug_info_comps_cache");
    ?>
 <?php 
    if (COption::GetOptionString("main", "component_cache_on", "Y") == "Y") {
        echo GetMessage("debug_info_comps_cache_on");
    } else {
        echo "<a href=\"/bitrix/admin/cache.php\"><font class=\"errortext\">" . GetMessage("debug_info_comps_cache_off") . "</font></a>";
    }
    ?>
.</p>
	<p><?php 
    if (\Bitrix\Main\Data\Cache::getShowCacheStat()) {
        echo GetMessage("debug_info_cache_size") . " ", CFile::FormatSize(\Bitrix\Main\Diag\CacheTracker::getCacheStatBytes(), 0);
    } else {
        echo "&nbsp;";
    }
    ?>
</p>
<?php 
    $obJSPopup->StartContent(array('buffer' => true));
    ?>
	<div id="BX_DEBUG_TIME_1">
		<div class="bx-debug-content bx-debug-content-table">

<table cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr class="heading">
		<td>&nbsp;</td>
		<td>&nbsp;</td>
Example #3
0
 public 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, "BX_STATE" => $GLOBALS["BX_STATE"], "CACHE_TYPE" => $cache_type, "CACHE_SIZE" => \Bitrix\Main\Data\Cache::getShowCacheStat() ? \Bitrix\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 (\Bitrix\Main\Data\Cache::getShowCacheStat()) {
         $this->arResult["CACHE"] = \Bitrix\Main\Diag\CacheTracker::getCacheTracking();
         \Bitrix\Main\Diag\CacheTracker::setCacheTracking($this->arCacheDebugSave);
         \Bitrix\Main\Diag\CacheTracker::setCacheStatBytes($CACHE_STAT_BYTES = $this->cache_size);
     }
 }