Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/stable/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func insertData(db *sql.DB, tableName string, dataCount int64, pool *grpool.Pool
atomic.StoreInt32(&errCount, 0)
}
}
if i%1000 == 0 {
if i%10000 == 0 {
log.Infof("%v Inserted: %v %v\n", time.Now().Sub(start), tableName, i)
}
if errCount > 10000 {
Expand Down Expand Up @@ -109,7 +109,7 @@ func main() {

createSqliteTestTable(db, tableName)

pool := grpool.NewPool(16, 32)
pool := grpool.NewPool(64, 512)
defer pool.Release()
insertData(db, tableName, 500000000, pool)
pool.WaitAll()
Expand Down
11 changes: 10 additions & 1 deletion test/stable/run_aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,14 @@ if [[ -z "$1" ]]; then
./scripts/start.sh miner3
./scripts/start.sh client
else
./scripts/start.sh $1
if [[ "$1" == "eventual" ]]; then
./scripts/start.sh bp
./scripts/start.sh miner0
./scripts/start.sh miner1
./scripts/start.sh miner2
./scripts/start.sh miner3
./scripts/start.sh client_eventual
else
./scripts/start.sh $1
fi
fi
29 changes: 23 additions & 6 deletions test/stable/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ fi

cd ${WORKING_DIR}

build_client(){
cd ${RUNNING_DIR}
go build -o 500million
docker cp covenantsql_bp_1:/app/cql ${RUNNING_DIR}
sleep 3s
}

case $role in
bp)
# start bp
Expand Down Expand Up @@ -46,16 +53,26 @@ case $role in
docker-compose start covenantsql_miner_3
;;
client)
cd ${RUNNING_DIR}
docker cp covenantsql_bp_1:/app/cql ${RUNNING_DIR}
sleep 3s
build_client

${RUNNING_DIR}/cql create -config ${RUNNING_DIR}/node_c/config.yaml \
-wait-tx-confirm -db-node 4 -advance-payment 2000000000
-wait-tx-confirm -db-node 4 -db-advance-payment 2000000000
dsn=$(cat ${RUNNING_DIR}/node_c/.dsn | tail -n1)

#Start client
go build -o 500million
nohup ${RUNNING_DIR}/500million -config ${RUNNING_DIR}/node_c/config.yaml -dsn ${dsn} > ${LOG_DIR}/client.log 2>&1 &
nohup ${RUNNING_DIR}/500million -config ${RUNNING_DIR}/node_c/config.yaml \
-dsn ${dsn} > ${LOG_DIR}/client.log 2>&1 &
;;
client_eventual)
build_client

${RUNNING_DIR}/cql create -config ${RUNNING_DIR}/node_c/config.yaml \
-wait-tx-confirm -db-node 4 -db-advance-payment 2000000000 -db-eventual-consistency
dsn_eventual=$(cat ${RUNNING_DIR}/node_c/.dsn | tail -n1)

#Start eventual client
nohup ${RUNNING_DIR}/500million -config ${RUNNING_DIR}/node_c/config.yaml \
-dsn ${dsn_eventual} > ${LOG_DIR}/client_eventual.log 2>&1 &
;;
esac

Expand Down