]> git.saurik.com Git - redis.git/blame_incremental - tests/helpers/gen_write_load.tcl
Now Lua scripts dispatch Redis commands properly calling the call() function. In...
[redis.git] / tests / helpers / gen_write_load.tcl
... / ...
CommitLineData
1source tests/support/redis.tcl
2
3proc gen_write_load {host port seconds} {
4 set start_time [clock seconds]
5 set r [redis $host $port 1]
6 $r select 9
7 while 1 {
8 $r set [expr rand()] [expr rand()]
9 if {[clock seconds]-$start_time > $seconds} {
10 exit 0
11 }
12 }
13}
14
15gen_write_load [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]