Giter VIP home page Giter VIP logo

rpc-performance's Introduction

支持dubbo框架dubbo协议、sofa rpc中bolt协议rpc性能测试。

一. fork压测模板工程

git clone https://github.com/zonghaishang/rpc-performance-test.git

按照压测模板工程指引,开发待压测的接口。

二、执行压测

cd rpc.benchmark
./benchmark.sh
usage: benchmark.sh [options]
 -b,--target <arg>         target benchmark runnable class
 -c,--threads <arg>        The number of concurrent
 -d,--duration <arg>       benchmark running duration(seconds)
 -h,--host <arg>           server host or address
 -p,--port <arg>           server port
 -t,--timeout <arg>        rpc request timeout(milliseconds)
 -tc,--connections <arg>   The number of tcp connection
 -w,--warm-up <arg>        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

压测执行完后,输出:

----------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

rpc-performance's People

Contributors

zonghaishang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.