From 4f32cf4e653d6ae88783b4cfcd146878c1a58eb9 Mon Sep 17 00:00:00 2001 From: Max Myers Date: Tue, 27 Nov 2012 10:14:44 -0500 Subject: [PATCH 1/4] Dragons not present after warning --- paths.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/paths.php b/paths.php index ab67c8a9..a683b5f0 100644 --- a/paths.php +++ b/paths.php @@ -55,6 +55,41 @@ // *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- // END OF USER CONFIGURATION. HERE BE DRAGONS! // *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- +/* + .~))>> + .~)>> + .~))))>>> + .~))>> ___ + .~))>>)))>> .-~))>> + .~)))))>> .-~))>>)> + .~)))>>))))>> .-~)>>)> + ) .~))>>))))>> .-~)))))>>)> + ( )@@*) //)>)))))) .-~))))>>)> + ).@(@@ //))>>))) .-~))>>)))))>>)> + (( @.@). //))))) .-~)>>)))))>>)> + )) )@@*.@@ ) //)>))) //))))))>>))))>>)> + (( ((@@@.@@ |/))))) //)))))>>)))>>)> + )) @@*. )@@ ) (\_(\-\b |))>)) //)))>>)))))))>>)> + (( @@@(.@(@ . _/`-` ~|b |>))) //)>>)))))))>>)> + )* @@@ )@* (@) (@) /\b|))) //))))))>>))))>> + (( @. )@( @ . _/ / / \b)) //))>>)))))>>>_._ + )@@ (@@*)@@. (6///6)- / ^ \b)//))))))>>)))>> ~~-. + ( @jgs@@. @@@.*@_ VvvvvV// ^ \b/)>>))))>> _. `bb + ((@@ @@@*.(@@ . - | o |' \ ( ^ \b)))>> .' b`, + ((@@).*@@ )@ ) \^^^/ (( ^ ~)_ \ / b `, + (@@. (@@ ). `-' ((( ^ `\ \ \ \ \| b `. + (*.@* / (((( \| | | \ . b `. + / / ((((( \ \ / _.-~\ Y, b ; + / / / (((((( \ \.-~ _.`" _.-~`, b ; + / / `(((((() ) (((((~ `, b ; + _/ _/ `"""/ /' ; b ; + _.-~_.-~ / /' _.'~bb _.' + ((((~~ / /' _.'~bb.--~ + (((( __.-~bb.-~ + .' b .~~ + :bb ,' + ~~~~ +*/ // -------------------------------------------------------------- // Change to the current working directory. From 742eb4ea8dfde766cd8dbdf58192c9bda920b85a Mon Sep 17 00:00:00 2001 From: Adam Becker Date: Mon, 3 Dec 2012 13:24:46 -0500 Subject: [PATCH 2/4] fix link to #route-groups --- laravel/documentation/contents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/documentation/contents.md b/laravel/documentation/contents.md index d29b3908..50c16e9c 100644 --- a/laravel/documentation/contents.md +++ b/laravel/documentation/contents.md @@ -15,7 +15,7 @@ ### General - [Filters](/docs/routing#filters) - [Pattern Filters](/docs/routing#pattern-filters) - [Global Filters](/docs/routing#global-filters) - - [Route Groups](/docs/routing#groups) + - [Route Groups](/docs/routing#route-groups) - [Named Routes](/docs/routing#named-routes) - [HTTPS Routes](/docs/routing#https-routes) - [Bundle Routes](/docs/routing#bundle-routes) From 4d6827ca1477cc681f31d296c07bb7229803cede Mon Sep 17 00:00:00 2001 From: Jesse O'Brien Date: Thu, 3 Jan 2013 11:43:01 -0500 Subject: [PATCH 3/4] Adding documentation for the Profiler logging and timers. Simple as that :) --- laravel/documentation/contents.md | 1 + laravel/documentation/profiler.md | 38 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 laravel/documentation/profiler.md diff --git a/laravel/documentation/contents.md b/laravel/documentation/contents.md index 50c16e9c..909da4c5 100644 --- a/laravel/documentation/contents.md +++ b/laravel/documentation/contents.md @@ -65,6 +65,7 @@ ### General - [Upgrading Bundles](/docs/bundles#upgrading-bundles) - [Class Auto Loading](/docs/loading) - [Errors & Logging](/docs/logging) +- [Profiler](/docs/profiler) - [Runtime Configuration](/docs/config) - [Examining Requests](/docs/requests) - [Generating URLs](/docs/urls) diff --git a/laravel/documentation/profiler.md b/laravel/documentation/profiler.md new file mode 100644 index 00000000..fe003c37 --- /dev/null +++ b/laravel/documentation/profiler.md @@ -0,0 +1,38 @@ +# Profiler + +## Contents +- [Logging to the Proiler](#logging) +- [Timers and Benchmarking](#timers) + + +## Logging + +It is possible to use the profiler to the Log viewing portion of the profiler. Throughout your application you can call the logger and have it displayed when the profiler is rendered. + +#### Logging to the profiler: + + Profiler::log('info', 'Log some information to the profiler'); + + +## Timers + +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. + +Each timer can have it's own individual name which gives it a timeline. Every timer with the same name is another 'tick' on that timeline. Each timer can also execute a callback on it to perform other operations. + +#### Using the generic timer timeline + + Profiler::tick(); + Profiler::tick(); + +#### Using multiple named timers with seperate timelines + + Profiler::tick('myTimer'); + Profiler::tick('nextTimer'); + Profiler::tick('myTimer'); + Profiler::tick('nextTimer'); + +#### Using a named timer with a callback + Profiler::tick('myTimer', function($timers) { + echo "I'm inside the timer callback!"; + }); From e854464a213644bbe6906cc36613a22347d7c915 Mon Sep 17 00:00:00 2001 From: Jesse O'Brien Date: Thu, 3 Jan 2013 12:01:19 -0500 Subject: [PATCH 4/4] 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.