From 5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 21 Jan 2026 22:40:55 +0100 Subject: Add Redis source code for testing --- examples/redis-unstable/utils/lru/README | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/redis-unstable/utils/lru/README (limited to 'examples/redis-unstable/utils/lru/README') diff --git a/examples/redis-unstable/utils/lru/README b/examples/redis-unstable/utils/lru/README new file mode 100644 index 0000000..f043b29 --- /dev/null +++ b/examples/redis-unstable/utils/lru/README @@ -0,0 +1,19 @@ +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 -- cgit v1.2.3