forked from OpenAtomFoundation/pika
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add redis test (OpenAtomFoundation#1357)
Co-authored-by: liuzhen3 <[email protected]>
- Loading branch information
Showing
64 changed files
with
11,877 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Pika test | ||
|
||
* 在Pika目录下执行 `./pikatests.sh geo` 测试Pika GEO命令 | ||
* 如果是`unit/type`接口, 例如 SET, 执行 `./pikatests.sh type/set` 测试Pika SET命令 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Pika port | ||
port : 9221 | ||
# Thread Number | ||
thread-num : 1 | ||
# Sync Thread Number | ||
sync-thread-num : 6 | ||
# Item count of sync thread queue | ||
sync-buffer-size : 10 | ||
# Pika log path | ||
log-path : ./log/ | ||
# Pika glog level: only INFO and ERROR | ||
loglevel : info | ||
# Pika db path | ||
db-path : ./db/ | ||
# Pika write-buffer-size | ||
write-buffer-size : 268435456 | ||
# Pika timeout | ||
timeout : 60 | ||
# Requirepass | ||
requirepass : | ||
# Masterauth | ||
masterauth : | ||
# Userpass | ||
userpass : | ||
# User Blacklist | ||
userblacklist : | ||
# Dump Prefix | ||
dump-prefix : | ||
# daemonize [yes | no] | ||
#daemonize : yes | ||
# slotmigrate [yes | no] | ||
#slotmigrate : no | ||
# Dump Path | ||
dump-path : ./dump/ | ||
# Expire-dump-days | ||
dump-expire : 0 | ||
# pidfile Path | ||
pidfile : ./pika.pid | ||
# Max Connection | ||
maxclients : 20000 | ||
# the per file size of sst to compact, defalut is 2M | ||
target-file-size-base : 20971520 | ||
# Expire-logs-days | ||
expire-logs-days : 7 | ||
# Expire-logs-nums | ||
expire-logs-nums : 10 | ||
# Root-connection-num | ||
root-connection-num : 2 | ||
# Slowlog-log-slower-than | ||
slowlog-log-slower-than : 10000 | ||
# slave-read-only(yes/no, 1/0) | ||
slave-read-only : 0 | ||
# Pika db sync path | ||
db-sync-path : ./dbsync/ | ||
# db sync speed(MB) max is set to 125MB, min is set to 0, and if below 0 or above 125, the value will be adjust to 125 | ||
db-sync-speed : -1 | ||
# network interface | ||
# network-interface : eth1 | ||
# replication | ||
# slaveof : master-ip:master-port | ||
# CronTask, format: start:end-ratio, like 02-04/60, pika will check to schedule compaction between 2 to 4 o'clock everyday | ||
# if the freesize/disksize > 60% | ||
# compact-cron : | ||
|
||
################### | ||
## Critical Settings | ||
################### | ||
# binlog file size: default is 100M, limited in [1K, 2G] | ||
binlog-file-size : 104857600 | ||
# Compression | ||
compression : snappy | ||
# max-background-flushes: default is 1, limited in [1, 4] | ||
max-background-flushes : 1 | ||
# max-background-compactions: default is 1, limited in [1, 4] | ||
max-background-compactions : 2 | ||
# max-cache-files default is 5000 | ||
max-cache-files : 5000 | ||
# max_bytes_for_level_multiplier: default is 10, you can change it to 5 | ||
max-bytes-for-level-multiplier : 10 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
source tests/support/redis.tcl | ||
source tests/support/util.tcl | ||
|
||
proc bg_complex_data {host port db ops} { | ||
set r [redis $host $port] | ||
$r select $db | ||
createComplexDataset $r $ops | ||
} | ||
|
||
bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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] |
Oops, something went wrong.