From e854464a213644bbe6906cc36613a22347d7c915 Mon Sep 17 00:00:00 2001 From: Jesse O'Brien Date: Thu, 3 Jan 2013 12:01:19 -0500 Subject: [PATCH] Added section on Enabling the profiler. Thanks to @sparksp for pointing it out. --- laravel/documentation/profiler.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/laravel/documentation/profiler.md b/laravel/documentation/profiler.md index fe003c37..5d0929d1 100644 --- a/laravel/documentation/profiler.md +++ b/laravel/documentation/profiler.md @@ -1,9 +1,21 @@ # Profiler ## Contents +- [Enabling the Proiler](#enable) - [Logging to the Proiler](#logging) - [Timers and Benchmarking](#timers) + +## 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. + ## Logging @@ -14,7 +26,7 @@ #### Logging to the profiler: Profiler::log('info', 'Log some information to the profiler'); -## 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.