Download the PHP package comodojo/dispatcher.plugin.performer without Composer
On this page you can find all versions of the php package comodojo/dispatcher.plugin.performer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download comodojo/dispatcher.plugin.performer
More information about comodojo/dispatcher.plugin.performer
Files in comodojo/dispatcher.plugin.performer
Package dispatcher.plugin.performer
Short Description Service performance plugin for comodojo/dispatcher.framework
License GPL-3.0+
Homepage http://dispatcher.comodojo.org
Informations about the package dispatcher.plugin.performer
dispatcher.plugin.performer
A service performance plugin for comodojo/dispatcher.framework.
If enabled, this plugin will inject 4 different headers in a service response:
- D-Request-Sec: time spent by framework to model request
- D-Route-Sec: routing time
- D-Result-Sec: service execution time
- D-Total-Sec: total time, from request to response
Values are calculated in microseconds.
Installation
Just require lib in a dispatcher.project installation (current version: 1.0.0):
composer require comodojo/dispatcher.plugin.performer 1.0.*
Usage
To enable performer in a single service, add 'perform' => true
into service parameters (routing-config.php), like:
To enable performer for all services, add DISPATCHER_PERFORM_EVERYTHING
constant into dispatcher-config.php file:
Demo
Dispatcher test environment contains a "Dispatcher performance" case.
Test environment is also available on the online demo.