0

I need to add local proxy like twemproxy or dynomite infront of a remote Redis server.

I want to compare the commands we use against the supported commands.

We use redis indirectly so I cannot scan our code to determine which commands need support with a high degree of certainty that I haven't missed something. So I would like to run the test suite against a Redis instance and afterwards determine every command that was run.

For example, at https://github.com/twitter/twemproxy/blob/master/notes/redis.md, a list like

+-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
|      Command      | Supported? | Format                                                                                                              |
+-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
|        DEL        |    Yes     | DEL key [key …]                                                                                                     |
+-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
|       DUMP        |    Yes     | DUMP key                                                                                                            |
+-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
|      EXISTS       |    Yes     | EXISTS key                                                                                                          |
+-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
|      EXPIRE       |    Yes     | EXPIRE key seconds                            

...

is provided to show which commands are supported.

How can I generate a list of Redis commands issued from a test suite?

user319862
  • 1,797
  • 2
  • 24
  • 32

1 Answers1

0

You can just run:

redis-cli monitor

in your Terminal to see all commands run, along with their timestamps.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Is this something that could be scripted after the test suite runs to parse all command names that were issued? – user319862 Jul 02 '21 at 17:59