Download the PHP package joomla/profiler without Composer
On this page you can find all versions of the php package joomla/profiler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joomla/profiler
More information about joomla/profiler
Files in joomla/profiler
Package profiler
Short Description Joomla Profiler Package
License GPL-2.0-or-later
Homepage https://github.com/joomla-framework/profiler
Informations about the package profiler
The Profiler Package
The Joomla Framework provides you a Profiler to profile the time that it takes to do certain tasks or reach various milestones as your extension runs.
Usage
You must at least mark the first point which will be the reference.
Now, you can retrieve the elapsed time between two points :
You can also retrieve the amount of allocated memory between two points.
When you have finished, you can output the result.
The output could look something like the following:
You can see each line is qualified by the name you used when creating your profiler, and then the names you used for the mark.
The start point (the first marked point) is the reference, and by consequence has a null time and memory usage.
We can see that the code executed between the "Start" and the "Middle" point took 1 second to perform and increased the memory usage by 3 Mega Bytes.
Writing your own Renderer
You can write your own renderer if you need an other formatting. In order to do so, you need to implement the ProfilerRendererInterface.
Now you can set your renderer in the Profiler :
It should output something like :
Installation via Composer
Add "joomla/profiler": "~3.0"
to the require block in your composer.json and then run composer install
.
Alternatively, you can simply run the following from the command line: