parameters: (self, server, from_date, to_date)
docstring: Gets top comm processed
  
          Args:
              server (str): Server ID
              from_date (datetime): Get stats from this date.
              to_date (datetime): Get stats to this date.
docstring_summary: Gets top comm processed
docstring_tokens: Gets top comm processed
function: def get_top_keys_stats(self, server, from_date, to_date):
          """Gets top comm processed
  
          Args:
              server (str): Server ID
              from_date (datetime): Get stats from this date.
              to_date (datetime): Get stats to this date.
          """
          time_fmt = '%Y-%m-%d %H:%M:%S'
          query = """SELECT keyname, COUNT(*) AS total
          FROM monitor
          WHERE datetime >= ?
          AND datetime <= ?
          AND server = ?
          GROUP BY keyname ORDER BY total DESC
          LIMIT 10;"""
          values = (from_date.strftime(time_fmt), to_date.strftime(time_fmt),
                    server)
  
          with contextlib.closing(self.conn.cursor()) as c:
              return [[r[0], r[1]] for r in c.execute(query, values)]
function_tokens: def get_top_keys_stats ( self , server , from_date , to_date ) : time_fmt = '%Y-%m-%d %H:%M:%S' query = """SELECT keyname, COUNT(*) AS total
          FROM monitor
          WHERE datetime >= ?
          AND datetime <= ?
          AND server = ?
          GROUP BY keyname ORDER BY total DESC
          LIMIT 10;""" values = ( from_date . strftime ( time_fmt ) , to_date . strftime ( time_fmt ) , server ) with contextlib . closing ( self . conn . cursor ( ) ) as c : return [ [ r [ 0 ] , r [ 1 ] ] for r in c . execute ( query , values ) ]