Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 8bc5f0c

Browse files
committed
make data larger
Signed-off-by: Liqi Geng <gengliqiii@gmail.com>
1 parent dfa2ab7 commit 8bc5f0c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/write-stress/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
)
3131

3232
var (
33-
dataNum = flag.Int("dataNum", 2000, "the number of data(the unit is 10 thoudstand)")
33+
dataNum = flag.Int("dataNum", 10000, "the number of data(the unit is 10 thoudstand)")
3434
concurrency = flag.Int("concurrency", 400, "concurrency of worker")
3535
batch = flag.Int("batch", 100, "batch of insert sql")
3636
)

tests/write-stress/write_stress.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const (
3939
TABLE_ID int(11) NOT NULL COMMENT '分库ID',
4040
CONTRACT_NO varchar(128) NOT NULL COMMENT '借据号',
4141
TERM_NO int(11) NOT NULL COMMENT '期次号',
42-
NOUSE char(60) NOT NULL COMMENT '填充位',
42+
NOUSE char(510) NOT NULL COMMENT '填充位',
4343
4444
UNIQUE KEY TMP_JIEB_INSTMNT_DAILY_IDX1 (CONTRACT_NO, TERM_NO),
4545
KEY TMP_JIEB_INSTMNT_DAILY_IDX2 (TABLE_ID, CONTRACT_NO)
@@ -161,7 +161,7 @@ func (c *writestressClient) Start(ctx context.Context, cfg interface{}, clientNo
161161
func (c *writestressClient) ExecuteInsert(db *sql.DB, pos int) error {
162162
totalNum := c.DataNum * 10000
163163
num := totalNum / c.Concurrency
164-
str := make([]byte, 50)
164+
str := make([]byte, 500)
165165
rnd := rand.New(rand.NewSource(time.Now().Unix()))
166166
for i := 0; i < num/c.Batch; i++ {
167167
tx, err := db.Begin()

0 commit comments

Comments
 (0)