PHP code example of devgo / php-performance
1. Go to this page and download the library: Download devgo/php-performance 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/ */
devgo / php-performance example snippets
use Devgo\Performance;
$performance = new Performance();
$performance->addStep('1');
usleep(200000); // 0.20s
$performance->addStep('2');
usleep(100000); // 0.10s
$performance->addStep('3');
usleep(400000); // 0.40s
$performance->addStep('4');
usleep(300000); // 0.30s
$performance->addStep('5');
var_dump($performance->buildReport());
composer