pitekantrop / shittyprofiler
A shitty profiler for Laravel.
Installs: 2 156
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- php: >=5.3.0
- illuminate/support: >=4.1,<4.3
This package is not auto-updated.
Last update: 2024-11-19 00:58:15 UTC
README
A shitty profiler for Laravel. It only shows some quick and dirty stats, but it's unobtrusive and easy to configure.
Installation
Add the following to your composer.json
file:
"pitekantrop/shittyprofiler":"*"
Then, run composer update
or composer install
if you haven't already installed any packages.
While you're waiting, add the following line to the providers
array in app/config/app.php
:
'Pitekantrop\ShittyProfiler\ProfilerServiceProvider',
And the profiler is installed.
Usage
While your app is in debug mode simply add the ?profile
query string to the URL of the request that you wish to inspect, and the usual output will be replaced with the profiler view.
Custom Markers
To measure time from the application start up to a certain point add the following marker in your code:
Profiler::mark('CustomMarker');
It is also possible to measure time between two markers:
Profiler::mark('AnotherCustomMarker'); // Some code Profiler::mark('AnotherCustomMarkerEnd');