Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Benchmarking Class

edited March 2011 in Modules

Just got "Plugin elapsed_time can not be found, maybe you forgot to bind it if it's a custom plugin?" trying to add {elapsed_time} at the footer of a page to see how the execution time goes with other caching such as eaccelerator...

Obviously the benchmarking class isnt auto-loaded in Fuel? Dunno how to do that myself?



  • edited 5:25AM
    There's a few ways:
    1. Add it to the autoload
    2. In your fuel/application/config/MY_config.php file, you can set the enable_profiler = TRUE
    3. If you are trying to profile a page that doesn't use a controller, you can load it in your views/_variables/global.php file like so:$CI->load->library('benchmark');
    4. If you are using a controller to render the page, you can load it like any other CI library.
  • edited 5:25AM
    Hrm, thought it was meant to be autoloaded by default? And if I do any of the above I get "Unable to load the requested class: benchmark"
  • edited 5:25AM
    My bad... you are right, that is already loaded. I was able to see the profiling OK on my local version when added to the code. How are you trying to implement it (e.g. in a controller or a view file etc)?
  • edited 5:25AM
    Just chucking {elapsed_time} in the standard footer view.
  • edited 5:25AM
    I see the issue. It's because of the Dwoo templating syntax is trying to process it. Try adding this.
Sign In or Register to comment.