PHP code example of renoki-co / octane-exporter

1. Go to this page and download the library: Download renoki-co/octane-exporter 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/ */

    

renoki-co / octane-exporter example snippets


return [

    'tables' => [
        'octane_exporter_requests:1' => [
            'total_count' => 'int',
            '2xx_count' => 'int',
            '3xx_count' => 'int',
            '4xx_count' => 'int',
            '5xx_count' => 'int',
        ],
        'octane_exporter_tasks:1' => [
            'total_count' => 'int',
            'active_count' => 'int',
        ],
        'octane_exporter_workers:1' => [
            'active_count' => 'int',
        ],
        'octane_exporter_ticks:1' => [
            'total_count' => 'int',
            'active_count' => 'int',
        ],

        // ...
    ],

];

return [

    'listeners' => [
        WorkerStarting::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackStartedWorkers::class,
        ],

        RequestTerminated::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackTerminatedRequests::class,
        ],

        TaskReceived::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackReceivedTasks::class,
        ],

        TaskTerminated::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackTerminatedTasks::class,
        ],

        TickReceived::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackReceivedTicks::class,
        ],

        TickTerminated::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackTerminatedTicks::class,
        ],

        WorkerStopping::class => [
            // ...
            \RenokiCo\OctaneExporter\Listeners\TrackStoppedWorkers::class,
        ],
    ],

];
bash
php artisan octane:install