valkey/utils/lru
Vlad a3fdc9cd82
Outdated comments, replace COUNTER_INIT_VAL with LFU_INIT_VAL, fix typo (#10888)
`COUNTER_INIT_VAL` doesn't exist in the code anymore so we can replace it with `LFU_INIT_VAL` entries
2022-06-21 08:14:31 +03:00
..
lfu-simulation.c Outdated comments, replace COUNTER_INIT_VAL with LFU_INIT_VAL, fix typo (#10888) 2022-06-21 08:14:31 +03:00
README LRU: test-lru.rb improved in different ways. 2016-07-11 16:23:50 +02:00
test-lru.rb test-lru.rb: support for testing volatile-ttl policy. 2016-07-20 19:02:20 +02: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 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