valkey/utils/lru
antirez 6972f18cbd Add test-lru.rb to utils.
This is a program useful to evaluate the Redis LRU algorithm behavior.
2014-03-21 09:52:05 +01:00
..
README Add test-lru.rb to utils. 2014-03-21 09:52:05 +01:00
test-lru.rb Add test-lru.rb to utils. 2014-03-21 09:52:05 +01:00

The test-lru.rb program can be used in order to check the behavior of the
Redis approximated LRU algorithm against the theoretical output of true
LRU algorithm.

In order to use the program you need to recompile Redis setting the define
REDIS_LRU_CLOCK_RESOLUTION to 1, by editing redis.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