Performance measurement
Flame graphs
The LanSuite developer setup supports generation of xDebug traces. Those traces can be used to generate a flame graph.
This guide shows you how to generate a flame graph. It assumes you have a local development setup running. This guide is not meant for your production site.
-
Get a local copy of https://github.com/brendangregg/FlameGraph
-
Start LanSuite via the docker-compose setup:
docker-compose up
-
Run a website call with the GET parameter
?XDEBUG_TRACE=lansuite
likehttp://127.0.0.1:8080/?XDEBUG_TRACE=lansuite
-
A new trace is generated and stored inside your root directory of the source code. It is called like
xdebug.trace.1689363817._code_index_php.xt.gz
-
Unpack the trace
gunzip xdebug.trace.1689363817._code_index_php.xt.gz
-
Switch to your local copy of the FlameGraph repository and call
php stackcollapse-xdebug.php ../lansuite/xdebug.trace.1689363817._code_index_php.xt | ./flamegraph.pl > lansuite.svg
-
Open
lansuite.svg
and you should see something like