private function OpCacheDataModel::_size_for_humans in Production check & Production monitor 7
Same name and namespace in other branches
- 6 includes/prod_check.opcache.inc \OpCacheDataModel::_size_for_humans()
6 calls to OpCacheDataModel::_size_for_humans()
- OpCacheDataModel::getConfigDataRows in includes/
prod_check.opcache.inc - OpCacheDataModel::getHumanFreeMemory in includes/
prod_check.opcache.inc - OpCacheDataModel::getHumanUsedMemory in includes/
prod_check.opcache.inc - OpCacheDataModel::getHumanWastedMemory in includes/
prod_check.opcache.inc - OpCacheDataModel::getScriptStatusRows in includes/
prod_check.opcache.inc
File
- includes/
prod_check.opcache.inc, line 260
Class
Code
private function _size_for_humans($bytes) {
if ($bytes > 1048576) {
return sprintf('%.2f MB', $bytes / 1048576);
}
else {
if ($bytes > 1024) {
return sprintf('%.2f kB', $bytes / 1024);
}
else {
return sprintf('%d bytes', $bytes);
}
}
}