gamenet / redis-memory-analyzer

Redis memory profiler to find the RAM bottlenecks throw scaning key space in real time and aggregate RAM usage statistic by patterns.
MIT License
772 stars 80 forks source link

Calculate Idle Time for All KeyTypes and Display Statistics #64

Open gpuneet456 opened 1 year ago

gpuneet456 commented 1 year ago

Description:

This pull request introduces a new feature to the Redis Memory Analyzer, which calculates the idle time for all key types and displays the minimum, maximum, and mean idle times in the Key Statistics tables. This feature aims to help users better understand key usage patterns and make informed decisions when managing their Redis instances.

Use Case: In certain projects, a single microservice may consume a large amount of memory in Redis by creating numerous keys. In such cases, users may choose to separate that microservice's Redis instance to better manage memory consumption. This feature will allow users to easily identify and clear keys associated with the microservice in the original Redis instance, freeing up memory.

By utilizing the idle time property, users can determine the key patterns that have not been accessed for an extended period of time. This information can then be used to decide which keys were used by the microservice in question and can be safely removed.

Changes:

Added functionality to calculate idle time for all key types Updated the Key Statistics tables to display min, max, and mean idle times