Development

/branches/1.4/lib/debug/sfWebDebugPanelMemory.class.php

You must first sign up to be able to contribute.

root/branches/1.4/lib/debug/sfWebDebugPanelMemory.class.php

Revision 21069, 0.9 kB (checked in by Kris.Wallsmith, 5 years ago)

[1.3] removed check for memory function in web debug memory panel, switched to more revealing memory_get_peak_usage()

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * sfWebDebugPanelMemory adds a panel to the web debug toolbar with the memory used by the script.
13  *
14  * @package    symfony
15  * @subpackage debug
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfWebDebugPanelMemory extends sfWebDebugPanel
20 {
21   public function getTitle()
22   {
23     $totalMemory = sprintf('%.1f', (memory_get_peak_usage(true) / 1024));
24
25     return '<img src="'.$this->webDebug->getOption('image_root_path').'/memory.png" alt="Memory" /> '.$totalMemory.' KB';
26   }
27
28   public function getPanelTitle()
29   {
30   }
31
32   public function getPanelContent()
33   {
34   }
35 }
36
Note: See TracBrowser for help on using the browser.