Skip to content

Commit

Permalink
optmize: adjust run parameters and fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
jayantxie committed Nov 13, 2024
1 parent 9a29d3a commit d30f3dd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
set -e

# benchmark params
n=20000000
n=10000000
method="echo"
body=(1024)
concurrent=(100 200 400 600 800 1000)
body=(1024 10240)
concurrent=(100)
qps=(0)
sleep=0
# NOTICE: if you want to dump profile, set "enable_profile" to 1
Expand Down Expand Up @@ -82,15 +82,19 @@ function kill_pid_listening_on_port() {

for p in $pids; do
echo "Sending termination signal to $p..."
kill -s SIGTERM $p # 发送 SIGTERM 信号给程序
kill -s SIGTERM $p # Send SIGTERM signal to the processes
done

# 给程序一定时间处理信号后再强制终止
# Give the processes a certain amount of time to
# handle the signal before forcibly terminating them.
sleep 2

# Ignore errors because the processes may not exist.
set +e
for p in $pids; do
echo killing $p...
kill $p
done
sleep 1
set -e
}

0 comments on commit d30f3dd

Please sign in to comment.