public function OpCacheDataModel::getGraphDataSetJson in Production check & Production monitor 6
Same name and namespace in other branches
- 7 includes/prod_check.opcache.inc \OpCacheDataModel::getGraphDataSetJson()
File
- includes/
prod_check.opcache.inc, line 160
Class
Code
public function getGraphDataSetJson() {
$dataset = array();
$dataset['memory'] = array(
$this->_status['memory_usage']['used_memory'],
$this->_status['memory_usage']['free_memory'],
$this->_status['memory_usage']['wasted_memory'],
);
$dataset['keys'] = array(
$this->_status['opcache_statistics']['num_cached_keys'],
$this->_status['opcache_statistics']['max_cached_keys'] - $this->_status['opcache_statistics']['num_cached_keys'],
0,
);
$dataset['hits'] = array(
$this->_status['opcache_statistics']['misses'],
$this->_status['opcache_statistics']['hits'],
0,
);
$dataset['restarts'] = array(
$this->_status['opcache_statistics']['oom_restarts'],
$this->_status['opcache_statistics']['manual_restarts'],
$this->_status['opcache_statistics']['hash_restarts'],
);
if (THOUSAND_SEPARATOR === true) {
$dataset['TSEP'] = 1;
}
else {
$dataset['TSEP'] = 0;
}
return json_encode($dataset);
}