PHP code example of maantje / pulse-database
1. Go to this page and download the library: Download maantje/pulse-database 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/ */
maantje / pulse-database example snippets
return [
// ...
'recorders' => [
\Maantje\Pulse\Database\Recorders\DatabaseRecorder::class => [
'connections' => [
'mysql_another' => [
'values' => [
'Connections',
'Threads_connected',
'Threads_running',
'Innodb_buffer_pool_reads',
'Innodb_buffer_pool_read_requests',
'Innodb_buffer_pool_pages_total',
'Max_used_connections'
],
'aggregates' => [
'avg' => [
'Threads_connected',
'Threads_running',
'Innodb_buffer_pool_reads',
'Innodb_buffer_pool_read_requests',
'Innodb_buffer_pool_pages_total',
],
'max' => [
//
],
'count' => [
//
],
],
],
'mysql' => [
'values' => [
'Connections',
'Threads_connected',
'Threads_running',
'Innodb_buffer_pool_reads',
'Innodb_buffer_pool_read_requests',
'Innodb_buffer_pool_pages_total',
'Max_used_connections'
],
'aggregates' => [
'avg' => [
'Threads_connected',
'Threads_running',
'Innodb_buffer_pool_reads',
'Innodb_buffer_pool_read_requests',
'Innodb_buffer_pool_pages_total',
],
'max' => [
//
],
'count' => [
//
],
],
]
]
],
]
]