1. Go to this page and download the library: Download yaknet/lighthouse library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yaknet / lighthouse example snippets
use YakNet\Lighthouse\Profiler;
// Start profiling the main flow with metadata tags
Profiler::start('Main Operation', ['controller' => 'UserController']);
// Start a sub-span (automatically becomes a child of 'Main Operation')
Profiler::start('DB Query', ['sql' => 'SELECT * FROM users']);
usleep(25000); // 25ms delay
Profiler::stop('DB Query');
// Stop the parent operation
Profiler::stop('Main Operation');