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
Heya,

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?

A

Comments

  • edited 4:33AM
    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 4:33AM
    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 4:33AM
    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 4:33AM
    Just chucking {elapsed_time} in the standard footer view.
  • edited 4:33AM
    I see the issue. It's because of the Dwoo templating syntax is trying to process it. Try adding this.
    {literal}{elapsed_time}{/literal}
Sign In or Register to comment.