from rma.redis import *

class GlobalKeySpace:
    def __init__(self, redis):
        """
        :param RmaRedis redis:
        :return:
        """
        self.redis = redis

    def analyze(self, keys=[]):
        total_keys = self.redis.total_keys()
        return [
            {
                'headers': ['Stat', "Value"],
                'data': [
                    ["Total keys in db", total_keys],
                    ["RedisDB key space overhead", dict_overhead(total_keys)]
                ]
            }
        ]

from rma.redis import *

class GlobalKeySpace:
    def __init__(self, redis):
        """
        :param RmaRedis redis:
        :return:
        """
        self.redis = redis

    def analyze(self, keys=[]):
        total_keys = self.redis.total_keys()
        keys_ = [
            ["Total keys in db", total_keys],
            ["RedisDB key space overhead", dict_overhead(total_keys)]
        ]
        keys_ += [["Used `{0}`".format(key), value] for key, value in self.redis.config_get("*max-*-*").items()]

        return [
            {
                'headers': ['Stat', "Value"],
                'data': keys_
            }
        ]

Add max config to globals
Add max config to globals

  from rma.redis import *
  
  class GlobalKeySpace:
      def __init__(self, redis):
          """
          :param RmaRedis redis:
          :return:
          """
          self.redis = redis
  
      def analyze(self, keys=[]):
          total_keys = self.redis.total_keys()
+         keys_ = [
+             ["Total keys in db", total_keys],
+             ["RedisDB key space overhead", dict_overhead(total_keys)]
+         ]
+         keys_ += [["Used `{0}`".format(key), value] for key, value in self.redis.config_get("*max-*-*").items()]
+ 
          return [
              {
                  'headers': ['Stat', "Value"],
-                 'data': [
+                 'data': keys_
-                     ["Total keys in db", total_keys],
-                     ["RedisDB key space overhead", dict_overhead(total_keys)]
-                 ]
              }
          ]
  
Add max config to globals
## Code Before:
from rma.redis import *

class GlobalKeySpace:
    def __init__(self, redis):
        """
        :param RmaRedis redis:
        :return:
        """
        self.redis = redis

    def analyze(self, keys=[]):
        total_keys = self.redis.total_keys()
        return [
            {
                'headers': ['Stat', "Value"],
                'data': [
                    ["Total keys in db", total_keys],
                    ["RedisDB key space overhead", dict_overhead(total_keys)]
                ]
            }
        ]

## Instruction:
Add max config to globals
## Code After:
from rma.redis import *

class GlobalKeySpace:
    def __init__(self, redis):
        """
        :param RmaRedis redis:
        :return:
        """
        self.redis = redis

    def analyze(self, keys=[]):
        total_keys = self.redis.total_keys()
        keys_ = [
            ["Total keys in db", total_keys],
            ["RedisDB key space overhead", dict_overhead(total_keys)]
        ]
        keys_ += [["Used `{0}`".format(key), value] for key, value in self.redis.config_get("*max-*-*").items()]

        return [
            {
                'headers': ['Stat', "Value"],
                'data': keys_
            }
        ]
