dckap_speedanalyser - Version 0.1.1

Version Notes

Bug Fixes

Download this release

Release Info

Developer DCKAP Inc.
Extension dckap_speedanalyser
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

app/code/community/DCKAP/Speedanalyzer/Model/Observer.php CHANGED
@@ -6,18 +6,32 @@ class DCKAP_Speedanalyzer_Model_Observer extends Mage_Core_Block_Abstract {
6
 
7
  /* @var $timer Mage_Core_Block_Profiler */
8
  $timers = Varien_Profiler::getTimers();
9
- //print_r($timers);exit;
 
10
  /* @var $block Mage_Core_Block_Abstract */
11
  $block = $observer->getBlock();
12
  $transport = $observer->getTransport();
13
  $fileName = $block->getTemplateFile();
14
  $thisClass = get_class($block);
15
  $thisname = $block->getNameInLayout();
16
- $fileLoadTime = number_format($timers[$fileName]['sum'],4);
17
- $blockLoadTime = number_format($timers['BLOCK: '.$thisname]['sum'],4);
18
- $fileLoadCount = $timers[$fileName]['count'];
19
- $blockLoadCount = $timers['BLOCK: '.$thisname]['count'];
20
- $showSpeedAnalyzer = Mage::getStoreConfig('speedanalyzer/general/speedanalyzerenable');
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  $showPath = Mage::getStoreConfig('speedanalyzer/general/templatepath');
22
  $showTime = Mage::getStoreConfig('speedanalyzer/general/showtime');
23
  $showCount = Mage::getStoreConfig('speedanalyzer/general/showcount');
@@ -64,7 +78,7 @@ class DCKAP_Speedanalyzer_Model_Observer extends Mage_Core_Block_Abstract {
64
  $html = $transport->getHtml();
65
  $html = $preHtml . $html . $postHtml;
66
  $transport->setHtml($html);
67
-
68
  //endif;
69
  }
70
  }
6
 
7
  /* @var $timer Mage_Core_Block_Profiler */
8
  $timers = Varien_Profiler::getTimers();
9
+ $showSpeedAnalyzer = Mage::getStoreConfig('speedanalyzer/general/speedanalyzerenable');
10
+ if($showSpeedAnalyzer):
11
  /* @var $block Mage_Core_Block_Abstract */
12
  $block = $observer->getBlock();
13
  $transport = $observer->getTransport();
14
  $fileName = $block->getTemplateFile();
15
  $thisClass = get_class($block);
16
  $thisname = $block->getNameInLayout();
17
+ if(!empty($timers[$fileName]))
18
+ {
19
+ $fileLoadTime = number_format($timers[$fileName]['sum'],4);
20
+ $fileLoadCount = $timers[$fileName]['count'];
21
+ }
22
+ else{
23
+ $fileLoadTime ='';
24
+ }
25
+ if(!empty($timers[$thisname]))
26
+ {
27
+ $blockLoadTime = number_format($timers['BLOCK: '.$thisname]['sum'],4);
28
+ $blockLoadCount = $timers['BLOCK: '.$thisname]['count'];
29
+ }
30
+ else {
31
+ $blockLoadTime = '';
32
+ }
33
+
34
+
35
  $showPath = Mage::getStoreConfig('speedanalyzer/general/templatepath');
36
  $showTime = Mage::getStoreConfig('speedanalyzer/general/showtime');
37
  $showCount = Mage::getStoreConfig('speedanalyzer/general/showcount');
78
  $html = $transport->getHtml();
79
  $html = $preHtml . $html . $postHtml;
80
  $transport->setHtml($html);
81
+ endif;
82
  //endif;
83
  }
84
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>dckap_speedanalyser</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -13,11 +13,11 @@ Speed Analyzer shows Path of Template and Block , Loading Time and Count.&#xD;
13
  &#xD;
14
  Based on the data obtained from Magento Profiler, Speed Analyzer depicts the data across each block so that the high bandwidth block can be optimized for better performance.&#xD;
15
  </description>
16
- <notes>Please add or uncomment "Varien_Profiler::enable();" in index.php file to make this module work.</notes>
17
  <authors><author><name>DCKAP Inc.</name><user>DCKAP</user><email>magento@dckap.com</email></author></authors>
18
- <date>2014-12-26</date>
19
- <time>12:43:12</time>
20
- <contents><target name="magecommunity"><dir name="DCKAP"><dir name="Speedanalyzer"><dir name="Block"><dir name="Adminhtml"><file name="Speedanalyzerbackend.php" hash="a0d9843ac2eb56136435aa5e1ed2cbff"/></dir><file name="Index.php" hash="37180667a88a56c829f72dd894e7d4cb"/></dir><dir name="Helper"><file name="Data.php" hash="dfc379116e166c99c966f25f9ace882d"/></dir><dir name="Model"><file name="Observer.php" hash="830db9175b893f5cfd6b842216e7b999"/><file name="Observer_new.php" hash=""/></dir><dir name="etc"><file name="adminhtml.xml" hash="2b2d5a0b678c4af4ad41cbadd74baa01"/><file name="config.xml" hash="0f45228cf4c207ba44a75c36720cd99f"/><file name="system.xml" hash="7ba611cbdc1a4b3e84903a7455046283"/><file name="system.xml~" hash="e947eb5ffdd98d7a29e7d035d0abfa8b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DCKAP_Speedanalyzer.xml" hash="29fe5034074f0ad043ed9b4ad01c77dc"/></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>dckap_speedanalyser</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
13
  &#xD;
14
  Based on the data obtained from Magento Profiler, Speed Analyzer depicts the data across each block so that the high bandwidth block can be optimized for better performance.&#xD;
15
  </description>
16
+ <notes>Bug Fixes</notes>
17
  <authors><author><name>DCKAP Inc.</name><user>DCKAP</user><email>magento@dckap.com</email></author></authors>
18
+ <date>2015-03-14</date>
19
+ <time>06:22:20</time>
20
+ <contents><target name="magecommunity"><dir name="DCKAP"><dir name="Speedanalyzer"><dir name="Block"><dir name="Adminhtml"><file name="Speedanalyzerbackend.php" hash="a0d9843ac2eb56136435aa5e1ed2cbff"/></dir><file name="Index.php" hash="37180667a88a56c829f72dd894e7d4cb"/></dir><dir name="Helper"><file name="Data.php" hash="dfc379116e166c99c966f25f9ace882d"/></dir><dir name="Model"><file name="Observer.php" hash="2147d2e6db468ddfed0fb1a881521b56"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2b2d5a0b678c4af4ad41cbadd74baa01"/><file name="config.xml" hash="0f45228cf4c207ba44a75c36720cd99f"/><file name="system.xml" hash="7ba611cbdc1a4b3e84903a7455046283"/><file name="system.xml~" hash="e947eb5ffdd98d7a29e7d035d0abfa8b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DCKAP_Speedanalyzer.xml" hash="29fe5034074f0ad043ed9b4ad01c77dc"/></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
23
  </package>