xref: /redis-3.2.3/utils/lru/README (revision 6972f18c)
1*6972f18cSantirezThe test-lru.rb program can be used in order to check the behavior of the
2*6972f18cSantirezRedis approximated LRU algorithm against the theoretical output of true
3*6972f18cSantirezLRU algorithm.
4*6972f18cSantirez
5*6972f18cSantirezIn order to use the program you need to recompile Redis setting the define
6*6972f18cSantirezREDIS_LRU_CLOCK_RESOLUTION to 1, by editing redis.h.
7*6972f18cSantirezThis allows to execute the program in a fast way since the 1 ms resolution
8*6972f18cSantirezis enough for all the objects to have a different enough time stamp during
9*6972f18cSantirezthe test.
10*6972f18cSantirez
11*6972f18cSantirezThe program is executed like this:
12*6972f18cSantirez
13*6972f18cSantirez    ruby test-lru.rb > /tmp/lru.html
14