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
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
- WooCommerce events
|
- WooCommerce events
|
||||||
|
- PHP version and OPcache status information
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- headers error from new line in Server Timing
|
- headers error from new line in Server Timing
|
||||||
|
|||||||
@@ -30,12 +30,19 @@ class Core_Load_Collector implements Record_Collector_Interface {
|
|||||||
|
|
||||||
$request_time = filter_var( $_SERVER['REQUEST_TIME_FLOAT'], FILTER_VALIDATE_FLOAT );
|
$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 $request_time
|
||||||
* @var float $timestart
|
* @var float $timestart
|
||||||
*/
|
*/
|
||||||
return [
|
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.
|
// 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' ),
|
new Record( 'Core and MU Plugins Load', $timestart, $this->timeload - $timestart, '', 'core' ),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in new issue
Block a user