https://github.com/zonghaishang/rpc-performance
rpc performance benchmark test framework.
https://github.com/zonghaishang/rpc-performance
dubbo rpc-benchmark sofa sofa-rpc sofastack
Last synced: about 1 year ago
JSON representation
rpc performance benchmark test framework.
- Host: GitHub
- URL: https://github.com/zonghaishang/rpc-performance
- Owner: zonghaishang
- License: apache-2.0
- Created: 2020-04-09T07:29:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-10T20:02:11.000Z (about 4 years ago)
- Last Synced: 2025-04-15T05:48:01.659Z (about 1 year ago)
- Topics: dubbo, rpc-benchmark, sofa, sofa-rpc, sofastack
- Language: Java
- Homepage:
- Size: 36.1 KB
- Stars: 14
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
支持dubbo框架dubbo协议、sofa rpc中bolt协议rpc性能测试。
一. fork压测模板工程
```shell
git clone https://github.com/zonghaishang/rpc-performance-test.git
```
按照[压测模板工程指引](https://github.com/zonghaishang/rpc-performance-test.git),开发待压测的接口。
二、执行压测
```shell
cd rpc.benchmark
./benchmark.sh
usage: benchmark.sh [options]
-b,--target target benchmark runnable class
-c,--threads The number of concurrent
-d,--duration benchmark running duration(seconds)
-h,--host server host or address
-p,--port server port
-t,--timeout rpc request timeout(milliseconds)
-tc,--connections The number of tcp connection
-w,--warm-up warm up duration(seconds)
# 开始压测, 为了测试结果更准确,建议warm up 30秒.
# 压测工具默认会不统计最后调用10秒
# eg:
./benchmark.sh -b BenchmarkRandom_1k -h 127.0.0.1 -p 20880 -d 300 -w 30
```
压测执行完后,输出:
```shell
----------Benchmark Statistics--------------
concurrents: 1
connections: 1
Running: 300s
Benchmark Time: 261s
Requests: 1463862 Success: 100% (1463862) Error: 0% (0)
Avg TPS: 5419 Max TPS: 5827 Min TPS: 4121
Avg RT: 0.184ms
RT <= 0: 0% 0/1463862
RT (0,1]: 99% 1462090/1463862
RT (1,5]: 0% 1709/1463862
RT (5,10]: 0% 34/1463862
RT (10,50]: 0% 27/1463862
RT (50,100]: 0% 1/1463862
RT (100,500]: 0% 1/1463862
RT (500,1000]: 0% 0/1463862
RT > 1000: 0% 0/1463862
```