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.
- Loading branch information
1 parent
b36870c
commit 517f883
Showing
68 changed files
with
11,389 additions
and
5 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
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,3 @@ | ||
1. 把pika可执行程序拷贝到./src目录里,更名为redis-server | ||
2. 把pika配置文件拷贝到./tests/assets/目录里,更名为default.conf | ||
3. 删除上次执行的db, log目录,执行 tclsh tests/test_helper.tcl --clients 1 --single unit/type/set 测试pika set, 也可以直接运行脚本./pikatest.sh 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,10 @@ | ||
#!/bin/bash | ||
rm -rf /home/songzhao/develop/pika_test/redis/log | ||
rm -rf /home/songzhao/develop/pika_test/redis/db | ||
cp /home/songzhao/develop/pika/output/bin/pika /home/songzhao/develop/pika_test/redis/src/redis-server | ||
#cp /home/songzhao/develop/pika/output/conf/pika.conf /home/songzhao/develop/pika_test/redis/tests/assets/default.conf | ||
|
||
tclsh tests/test_helper.tcl --clients 1 --single unit/type/$1 | ||
|
||
rm -rf /home/songzhao/develop/pika_test/redis/log | ||
rm -rf /home/songzhao/develop/pika_test/redis/db |
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,32 @@ | ||
# Pika port | ||
port : 9221 | ||
# Thread Number | ||
thread_num : 16 | ||
# Slave Thread Number | ||
slave_thread_num : 7 | ||
# Pika log path | ||
log_path : ./log | ||
# Pika glog level | ||
log_level : 0 | ||
# Pika db path | ||
db_path : ./db/ | ||
# Pika write_buffer_size | ||
write_buffer_size : 268435456 | ||
# Pika timeout | ||
timeout : 60 | ||
# Requirepass | ||
requirepass : | ||
# Dump Prefix | ||
dump_prefix : | ||
# daemonize [yes | no] | ||
#daemonize : yes | ||
# Dump Path | ||
dump_path : ./dump/ | ||
# Max Connection | ||
maxconnection : 20000 | ||
# the per file size of sst to compact, defalut is 2M | ||
target_file_size_base : 20971520 | ||
# Expire_logs_days | ||
expire_logs_days : 1 | ||
# Expire_logs_nums | ||
expire_logs_nums : 20 |
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.