Added PHP version and OPcache status information.
This commit is contained in:
1 parent
15ff72afb0
commit
828d70cdd1
2 files changed
+9
-1
No files matched your search
@@ -30,12 +30,19 @@ class Core_Load_Collector implements Record_Collector_Interface {
|
||||
|
||||
$request_time = filter_var( $_SERVER['REQUEST_TIME_FLOAT'], FILTER_VALIDATE_FLOAT );
|
||||
|
||||
$php = 'PHP Load – ' . PHP_VERSION;
|
||||
|
||||
if ( function_exists( 'opcache_get_status' ) ) {
|
||||
$zend_status = opcache_get_status();
|
||||
$php .= empty( $zend_status['opcache_enabled'] ) ? '' : ' – OPcache';
|
||||
}
|
||||
|
||||
/**
|
||||
* @var float $request_time
|
||||
* @var float $timestart
|
||||
*/
|
||||
return [
|
||||
new Record( 'PHP Load', $request_time, $timestart - $request_time, '', 'php' ),
|
||||
new Record( $php, $request_time, $timestart - $request_time, '', 'php' ),
|
||||
// TODO This includes network plugins on multisite, need conditional label if Laps is network–activated.
|
||||
new Record( 'Core and MU Plugins Load', $timestart, $this->timeload - $timestart, '', 'core' ),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user