src/Facade.php
public static function getManagersStats()
    {

        $managersStats = [];
        foreach (static::$producers as $appId => $producer) {

            /** @var $producer Producer */
            $redis = $producer->getRedis();
            $keys = [
                'stat' => $redis->keys(Manager::REDIS_NS_STATS . '*'),
                'live' => $redis->keys(Manager::REDIS_NS_LIVE . '*')
            ];

            foreach ($keys as $type => $statsKeys) {
                foreach ($statsKeys as $statsKey) {
                    $parse = Manager::parseManagerStatKey($statsKey);
                    if ($appId != $parse['appId']) {
                        continue;
                    }

                    $statsItemData = $redis->hgetall($statsKey);
                    $statsItemData['workerClass'] = $parse['workerClass'];
                    $statsItemData['appId'] = $parse['appId'];
                    $managersStats[$parse['appId']][$type][] = $statsItemData;
                }
            }

        }

        return $managersStats;
    }
public static function getManagersStats()
    {

        $managersStats = [];
        foreach (static::$producers as $appId => $producer) {

            /** @var $producer Producer */
            $redis = $producer->getRedis();
            $keys = [
                'stat' => $redis->keys(Manager::REDIS_NS_STATS . '*'),
                'live' => $redis->keys(Manager::REDIS_NS_LIVE . '*')
            ];

            foreach ($keys as $type => $statsKeys) {
                foreach ($statsKeys as $statsKey) {
                    $parse = Manager::parseManagerStatKey($statsKey);
                    if ($appId != $parse['appId']) {
                        continue;
                    }

                    $statsItemData = $redis->hgetall($statsKey);
                    $statsItemData['workerClass'] = $parse['workerClass'];
                    $statsItemData['appId'] = $parse['appId'];
                    $managersStats[$parse['appId']][$type][] = $statsItemData;
                }
            }

        }

        return $managersStats;
    }
public static function getManagersStats ( ) { $ managersStats = [ ] ; foreach ( static :: $ producers as $ appId => $ producer ) { /** @var $producer Producer */ $ redis = $ producer -> getRedis ( ) ; $ keys = [ 'stat' => $ redis -> keys ( Manager :: REDIS_NS_STATS . '*' ) , 'live' => $ redis -> keys ( Manager :: REDIS_NS_LIVE . '*' ) ] ; foreach ( $ keys as $ type => $ statsKeys ) { foreach ( $ statsKeys as $ statsKey ) { $ parse = Manager :: parseManagerStatKey ( $ statsKey ) ; if ( $ appId != $ parse [ 'appId' ] ) { continue ; } $ statsItemData = $ redis -> hgetall ( $ statsKey ) ; $ statsItemData [ 'workerClass' ] = $ parse [ 'workerClass' ] ; $ statsItemData [ 'appId' ] = $ parse [ 'appId' ] ; $ managersStats [ $ parse [ 'appId' ] ] [ $ type ] [ ] = $ statsItemData ; } } } return $ managersStats ; }
Get all managers statistic

@return array
Get all managers statistic