-
Notifications
You must be signed in to change notification settings - Fork 26
Custom profiler overdiv
Custom profiler, similar in function to Kohana profiler, overdiv on top and hidden, activated by mouse click.
Uses jQuery.
Hope can be a base to make a better visual profiler.
Download: File:MY_Profiler.zip
Install:
Copy the file to your application/libraries directory Be sure your subclass_prefix config (in config.php), its MY_, else change the MY_Profiler.php name to your subclass_prefix name, also remember to modify class name in the MY_Profiler.php file.
[code] <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Profiler extends CI_Profiler { function MY_profiler() { parent::CI_Profiler(); }
function run()
{
// START JQueryLoad
// Remove if you load Jquery else where
$output = '<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>';
// End JQueryLoad
$i_currentDIV = rand(10,99).substr(md5($_SERVER["REQUEST_URI"]),0,6);
$output .= "
URI | Controler | Memory | Benchmarks | Variables | SQL | <<< | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
";
$output .= " ";
$output .= $this->_compile_uri_string();
$output .= " ";
$output .= "";
$output .= $this->_compile_controller_info();
$output .= " ";
$output .= "";
$output .= $this->_compile_memory_usage();
$output .= " ";
$output .= "";
$output .= $this->_compile_benchmarks();
$output .= " ";
$output .= "";
$output .= $this->_compile_get();
$output .= $this->_compile_post();
$output .= " ";
$output .= "";
$output .= $this->_compile_queries();
$output .= " ";
$output .= " |