If you want to measure how much time your Redis Lua script takes to be executed, you can use Redis’ TIME command to get the current server time during the start of the script and the end of the script.
Measuring the difference between the finish and the start points, you can check the duration of the execution of the script.
Add the following lines to your Redis Lua script:
1 2 3 4 5 6 7
local start = redis.call('TIME') -- your logic here local finish = redis.call('TIME') return finish - start