RedisInsight Profiler Tool - Analyze Your Redis Commands Using Redis Monitor Command
Last week the maintenance release of RedisInsight Preview 2.0 (v2.0.4) was introduced by the RedisInsight Team. RedisInsight v2.0 is a complete product rewrite based on a new tech stack composed of Electron, Elastic UI, Monaco Editor, and Node.js. This newer preview build added a dedicated RedisInsight Profiler UI for the first time. The profiler uses the MONITOR command to analyze every command sent to the Redis instance in real time.
RedisInsight Profiler analyzes your Redis commands that are being run on the Redis server in real time. The tool provides you detailed information about the number of commands processed, commands/second, and number of connected clients. It also gives information about top prefixes, top keys, and top commands.
It basically runs the Redis MONITOR command and generates a summarized view. MONITOR is a debugging command that streams back every command processed by the Redis server. It can help in understanding what is happening to the database. This command can both be used via redis-cli and via telnet. All the commands sent to the Redis instance are monitored for the duration of the profiling. The ability to see all the requests processed by the server is useful in order to spot bugs in an application, both when using Redis as a database and as a distributed caching system.
Follow the below instructions to test drive RedisInsight Profiler tool introduced under the RedisInsight v2.0.4 release:
#
Step 1. Create Redis database with RedisTimeSeries module enabledVisit https://developer.redis.com/create/rediscloud and create a Redis database. Follow these steps to enable RedisTimeSeries module on Redis Enterprise Cloud.
#
Step 2. Create databaseClick “Create Database”. Enter database name and select RedisTimeSeries Module.
Once the database is created, you will see the endpoint URL that gets generated. Save it for future reference.
#
Step 3. Download RedisInsightTo install RedisInsight on your local system, you need to first download the software from the Redis website.**
Click this link to access a form that allows you to select the operating system of your choice.**
Execute the installer. Once it is installed on your computer, click on the RedisInsight icon to open the tool.
#
Step 4. Connect to Redis Enterprise Cloud DatabaseAs the database is empty, you won’t be able to see any key.
#
Step 5. Execute the scriptBelow is the script that creates a time series representing sensor temperature measurements. After you create the time series, you can send temperature measurements. Then you can query the data for a time range on some aggregation rule.
Results:
#
Step 6. Running ProfilerThe new RedisInsight Browser tool allows you to explore keys in your Redis server. You can add, edit, and delete a key. It also helps you to browse, filter, and visualize key-value Redis data structures.
Open Browser tool and select TS from the drop-down menu as shown below:
It will display temperature as a key. Choose the “Profiler” option and click on “Start Profiler.”
Soon you will be able to see the detailed information about the number of commands processed, commands/second, and number of connected clients. It also gives information about top prefixes, top keys, and top commands.