1The test-lru.rb program can be used in order to check the behavior of the 2Redis approximated LRU algorithm against the theoretical output of true 3LRU algorithm. 4 5In order to use the program you need to recompile Redis setting the define 6REDIS_LRU_CLOCK_RESOLUTION to 1, by editing the file server.h. 7This allows to execute the program in a fast way since the 1 ms resolution 8is enough for all the objects to have a different enough time stamp during 9the test. 10 11The program is executed like this: 12 13 ruby test-lru.rb /tmp/lru.html 14 15You can optionally specify a number of times to run, so that the program 16will output averages of different runs, by adding an additional argument. 17For instance in order to run the test 10 times use: 18 19 ruby test-lru.rb /tmp/lru.html 10 20