protected function getServerStats($pattern = '')
    {
        $stats = (array) $this->getPheanstalk()->stats();

        if (! empty($pattern)) {
            $stats = array_filter($stats, function ($key) use ($pattern) {
                return 1 === preg_match("/$pattern/i", $key);
            }, ARRAY_FILTER_USE_KEY);
        }

        ksort($stats);

        return $stats;
    }