PHP code example of php-bug-catcher / perf-collector-bundle

1. Go to this page and download the library: Download php-bug-catcher/perf-collector-bundle 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/ */

    

php-bug-catcher / perf-collector-bundle example snippets


// config/bundles.php
return [
    // ...
    BugCatcher\PerfCollectorBundle\PerfCollectorBundle::class => ['all' => true],
];

$GLOBALS['_bcperf_extra']['api_ms'] = $elapsedMilliseconds;
ini
; /etc/php.d/90-bcperf.ini  (or your pool's php.ini)
auto_prepend_file = /srv/app/vendor/php-bug-catcher/perf-collector/hook/collector.php
bcperf.log = /dev/shm/bcperf.jsonl
cron
* * * * *  php /srv/app/bin/console bug-catcher:perf-aggregate

php bin/console bug-catcher:perf-aggregate --dry-run