mirror of
http://github.com/valkey-io/valkey
synced 2024-11-24 16:41:02 +00:00
e71be72745
This utils/lru/README incorrectly refers to REDIS_LRU_CLOCK_RESOLUTION in server.h to modify the LRU clock resolution. However, the actual constant in server.h has been updated to LRU_CLOCK_RESOLUTION, but the README was not updated to reflect this change. 1. Replaced REDIS_LRU_CLOCK_RESOLUTION with LRU_CLOCK_RESOLUTION in the text of utils/lru/README. 2. Updated references from "Redis" to "Valkey" within the same README file as part of the ongoing rebranding efforts:) --------- Signed-off-by: Sher Sun <sher.sun@huawei.com> Co-authored-by: Sher Sun <sher.sun@huawei.com> |
||
---|---|---|
.. | ||
lfu-simulation.c | ||
README | ||
test-lru.rb |
The test-lru.rb program can be used in order to check the behavior of the Valkey approximated LRU algorithm against the theoretical output of true LRU algorithm. In order to use the program you need to recompile Valkey setting the define LRU_CLOCK_RESOLUTION to 1, by editing the file server.h. This allows to execute the program in a fast way since the 1 ms resolution is enough for all the objects to have a different enough time stamp during the test. The program is executed like this: ruby test-lru.rb /tmp/lru.html You can optionally specify a number of times to run, so that the program will output averages of different runs, by adding an additional argument. For instance in order to run the test 10 times use: ruby test-lru.rb /tmp/lru.html 10