Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename env.sh to base.sh and fix the to_csv.sh that cannot get GRPC str correctly #71

Merged
merged 2 commits into from
Aug 8, 2024
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ python3 ./scripts/reports/diff.py output/2021-12-13-21-40.csv output/2021-12-13-

### Profiling

Since the default benchmark will complete quickly, to obtain enough time to do profiling, you can increase the parameter `n` in `./scripts/env.sh`.
Since the default benchmark will complete quickly, to obtain enough time to do profiling, you can increase the parameter `n` in `./scripts/base.sh`.

#### Profiling Client

Expand Down Expand Up @@ -131,7 +131,7 @@ go tool pprof localhost:{port}/debug/pprof/{pprof_type}

### More scenarios

Modify the `./scripts/env.sh` file:
Modify the `./scripts/base.sh` file:

```bash
# Send pressure test request number
Expand Down
4 changes: 2 additions & 2 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ python ./scripts/reports/diff.py output/2021-12-13-21-40.csv output/2021-12-13-2

### Profiling

由于默认压测参数会比较迅速完成一次压测,为了获得更长采集时间,可以手动在 `./scripts/env.sh` 中调整压测参数 n 大小。
由于默认压测参数会比较迅速完成一次压测,为了获得更长采集时间,可以手动在 `./scripts/base.sh` 中调整压测参数 n 大小。

#### Profiling Client

Expand Down Expand Up @@ -129,7 +129,7 @@ go tool pprof localhost:{port}/debug/pprof/{pprof_type}

### 更多场景测试

修改 `./scripts/env.sh` 文件:
修改 `./scripts/base.sh` 文件:

```bash
# 发送压测请求数
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/benchmark_generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
CURDIR=$(cd $(dirname $0); pwd)

echo "Checking whether the environment meets the requirements ..."
source $CURDIR/env.sh
source $CURDIR/base.sh
echo "Check finished."

srepo=("generic_http" "generic_json" "generic_map" "generic_ordinary")
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark_grpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
CURDIR=$(cd $(dirname $0); pwd)

echo "Checking whether the environment meets the requirements ..."
source $CURDIR/env.sh
source $CURDIR/base.sh
echo "Check finished."

srepo=("grpc" "kitex")
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark_pb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
CURDIR=$(cd $(dirname $0); pwd)

echo "Checking whether the environment meets the requirements ..."
source $CURDIR/env.sh
source $CURDIR/base.sh
echo "Check finished."

srepo=("grpc" "kitex" "kitex-mux" "rpcx" "arpc")
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark_streaming.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ports=(8000 8001)

CURDIR=$(cd $(dirname $0); pwd)
echo "Checking whether the environment meets the requirements ..."
source $CURDIR/env.sh
source $CURDIR/base.sh
echo "Check finished."

echo "Building streaming services by exec build_streaming.sh..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark_thrift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
CURDIR=$(cd $(dirname $0); pwd)

echo "Checking whether the environment meets the requirements ..."
source $CURDIR/env.sh
source $CURDIR/base.sh
echo "Check finished."

srepo=("kitex" "kitex-mux")
Expand Down
6 changes: 3 additions & 3 deletions scripts/reports/to_csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# usage: to_csv.sh xxx.log
output_dir=$(dirname "$1")
# Kind,Concurrency,Data_Size,TPS,AVG,P99,Server_CPU,Client_CPU
grep TPS "$1" | awk '{print $2" "$13" "$11" "$4" "$6" "$8}' | awk '{gsub(/[:c=,(b=msAVG%]/, "")} 1' > $output_dir/tps.out
grep '@Server' "$1" | grep CPU | awk '{print $14}' | awk '{gsub(/[:c=,(b=msAVG%]/, "")} 1' > $output_dir/server.out
grep '@Client' "$1" | grep CPU | awk '{print $14}' | awk '{gsub(/[:c=,(b=msAVG%]/, "")} 1' > $output_dir/client.out
grep TPS "$1" | awk '{print $2" "$13" "$11" "$4" "$6" "$8}' | awk '{gsub(/[:c=,(b=ms%]/, "")} 1' > $output_dir/tps.out
grep '@Server' "$1" | grep CPU | awk '{print $14}' | awk '{gsub(/[%:]||AVG/, "")} 1' > $output_dir/server.out
grep '@Client' "$1" | grep CPU | awk '{print $14}' | awk '{gsub(/[%:]||AVG/, "")} 1' > $output_dir/client.out
# combine each line, replace space by comma
awk '{ lines[FNR] = lines[FNR] $0 " " } END { for (i=1; i<=FNR; i++) print lines[i] }' $output_dir/tps.out $output_dir/server.out $output_dir/client.out | awk '{ print substr($0, 1, length($0)-1) }' | awk '{gsub(" ", ",")} 1'
2 changes: 1 addition & 1 deletion scripts/run_grpc_clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ports=(8000 8006)
ip=${IP:-"127.0.0.1"}

# build
source $CURDIR/env.sh
source $CURDIR/base.sh
source $CURDIR/build_grpc.sh

# benchmark
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_grpc_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CURDIR=$(cd $(dirname $0); pwd)
repo=("grpc" "kitex")

# build
source $CURDIR/env.sh
source $CURDIR/base.sh
source $CURDIR/build_grpc.sh

# benchmark
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_pb_clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ports=(8000 8001 8002 8003 8004)
ip=${IP:-"127.0.0.1"}

# build
source $CURDIR/env.sh
source $CURDIR/base.sh
source $CURDIR/build_pb.sh

# benchmark
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_pb_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CURDIR=$(cd $(dirname $0); pwd)
repo=("grpc" "kitex" "kitex-mux" "rpcx" "arpc")

# build
source $CURDIR/env.sh
source $CURDIR/base.sh
source $CURDIR/build_pb.sh

# benchmark
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_thrift_clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ports=(8001 8002)
ip=${IP:-"127.0.0.1"}

# build
source $CURDIR/env.sh
source $CURDIR/base.sh
source $CURDIR/build_thrift.sh

# benchmark
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_thrift_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CURDIR=$(cd $(dirname $0); pwd)
repo=("kitex" "kitex-mux")

# build
source $CURDIR/env.sh
source $CURDIR/base.sh
source $CURDIR/build_thrift.sh

# benchmark
Expand Down
Loading