1
0
mirror of https://github.com/fluencelabs/redis synced 2025-06-24 06:21:32 +00:00
Files
deps
src
tests
assets
cluster
helpers
bg_block_op.tcl
bg_complex_data.tcl
gen_write_load.tcl
integration
sentinel
support
tmp
unit
instances.tcl
test_helper.tcl
utils
.gitignore
00-RELEASENOTES
BUGS
CONTRIBUTING
COPYING
INSTALL
MANIFESTO
Makefile
README.md
redis.conf
runtest
runtest-cluster
runtest-sentinel
sentinel.conf
redis/tests/helpers/gen_write_load.tcl

16 lines
372 B
Tcl
Raw Normal View History

source tests/support/redis.tcl
proc gen_write_load {host port seconds} {
set start_time [clock seconds]
set r [redis $host $port 1]
$r select 9
while 1 {
$r set [expr rand()] [expr rand()]
if {[clock seconds]-$start_time > $seconds} {
exit 0
}
}
}
gen_write_load [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]