Added section on Enabling the profiler.

Thanks to @sparksp for pointing it out.
This commit is contained in:
Jesse O'Brien 2013-01-03 12:01:19 -05:00
parent 4d6827ca14
commit e854464a21
1 changed files with 13 additions and 1 deletions

View File

@ -1,9 +1,21 @@
# Profiler # Profiler
## Contents ## Contents
- [Enabling the Proiler](#enable)
- [Logging to the Proiler](#logging) - [Logging to the Proiler](#logging)
- [Timers and Benchmarking](#timers) - [Timers and Benchmarking](#timers)
<a name="enable"></a>
## Enabling the Profiler
To enable the profiler, you need to edit **application/config/application.php** and switch the profiler option to **true**.
'profiler' => true,
This will attach the profiler code to **all** responses coming back from your laravel install.
**Note:** As of the time of this writing a common problem with the profiler being enabled is any requests that return JSON will also include the profiler code, and destroy the JSON syntax in the response.
<a name="logging"></a> <a name="logging"></a>
## Logging ## Logging
@ -14,7 +26,7 @@ #### Logging to the profiler:
Profiler::log('info', 'Log some information to the profiler'); Profiler::log('info', 'Log some information to the profiler');
<a name="timers"></a> <a name="timers"></a>
## Timers ## Timers and Benchmarking
Timing and benchmarking your app is simple with the ```tick()``` function on the profiler. It allows you to set various different timers in your app and will show you their performance when your app ends execution. Timing and benchmarking your app is simple with the ```tick()``` function on the profiler. It allows you to set various different timers in your app and will show you their performance when your app ends execution.