/**
* This function retrieves statistics about all memcache server groups.
*
* @return Array with the names of each stat and an array with the value for each
* server group.
*/
public static function getStats()
{
$ret = array();
foreach (self::getMemcacheServers() as $sg) {
$stats = $sg->getExtendedStats();
if ($stats === FALSE) {
throw new Exception('Failed to get memcache server status.');
}
$stats = SimpleSAML_Utilities::transposeArray($stats);
$ret = array_merge_recursive($ret, $stats);
}
return $ret;
}