NOTE: This image is intended to be used with nfqlt/docker vagrant box and other nfqlt docker images. Other use scenarios might work but are not tested yet.
This container includes mongodb, php-cli and xhgui project
Simple add this container to your project with name xhgui (or link it with other containers with xhgui name) There is only a single port 80 that needs to be exposed: recommended value is 1081 Example:
version: '2.4'
services:
xhgui:
image: nfqlt/xhgui
ports:
- "10.24.2.49:1081:80"
Additional to xhgui you'll need a php tideways extension enabled in your fpm and/or dev containers.
After enabling tideways extension a prepared php file will be included in project execution chain with php directive auto_prepend_file, but by default it will not profile anything, so the impact at this stage will be minimal. To actually profile application there are few ways:
NFQ_PROFILER=1 php ./script.phppublic function magicMethod()
{
\NfqProfiler::startProfiler();
$this->someHeavyAndBigLogic();
\NfqProfiler::stopProfiler();
}
/**
* Starts tideways profiler
*
* @param int $flags - Flags passed to tideways_enable()*
* @param array $options - Options passed to tideways enable()*
* @param bool $manual - Should be true if started manually
*/
public static function startProfiler($flags = null, $options = array(), $manual = true);
/**
* Stops profiling and send data to xhgui, also will return array containing data
* sent to xhgui
*
* @param bool $shouldFlush - Should flush php buffers before stopping the profiler
* @param bool $manual - Should be true if stopped manually
* @return array
*/
public static function stopProfiler($shouldFlush = true, $manual = true);
Content type
Image
Digest
sha256:66faf460b…
Size
378.5 MB
Last updated
12 days ago
docker pull nfqlt/xhgui