PHP code example of subiabre / appgati

1. Go to this page and download the library: Download subiabre/appgati 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/ */

    

subiabre / appgati example snippets




= new AppGati;

$app->step('start');

// some code...

$app->step('end');

$report = $app->getReport('start', 'end');

print_r($report);

Array
(
    ['Clock time in seconds'] => 14.363237142563
    ['Time taken in User Mode in seconds'] => 0.676958
    ['Time taken in System Mode in seconds'] => 13.680072
    ['Total time taken in Kernel in seconds'] => 14.35703
    ['Memory limit in MB'] => -1
    ['Memory usage in MB'] => 0.002655029296875
    ['Peak memory usage in MB'] => 1.0958099365234
    ['Maximum resident shared size in KB'] => 0
    ['Integral shared memory size'] => 0
    ['Integral unshared data size'] => 0
    ['Integral unshared stack size'] => Not Available
    ['Number of page reclaims'] => 0
    ['Number of page faults'] => 0
    ['Number of block input operations'] => 0
    ['Number of block output operations'] => Not Available
    ['Number of messages sent'] => 0
    ['Number of messages received'] => 0
    ['Number of signals received'] => 0
    ['Number of voluntary context switches'] => 0
    ['Number of involuntary context switches'] => 1514
)