valkey/utils/lru/README
Sher_Sun e71be72745
Fix typo and rename Redis to Valkey in the utils/lru/README (#314)
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>
2024-04-14 11:40:01 -07:00

20 lines
767 B
Plaintext

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