PHP code example of metallizzer / laravel-bench

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

    

metallizzer / laravel-bench example snippets


return [
    /*
     * The benchmark page will be available on this path.
     */
    'path' => '/bench',

    /*
     * By default this package will only run in local development.
     * Do not change this, unless you know what your are doing.
     */
    'enabled' => env('APP_ENV') === 'local',

    /*
     * The maximum execution time, in seconds. If set to zero, no time limit is imposed.
     */
    'max_execution_time' => 0,
];
bash
php artisan vendor:publish --provider="Metallizzer\Bench\BenchServiceProvider" --tag="bench-assets"
bash
php artisan vendor:publish --provider="Metallizzer\Bench\BenchServiceProvider" --tag="config"
bash
php artisan bench:run
bash
php artisan bench:run --benchmark="Benchmark\Class"
bash
php artisan bench:make