Coder Social home page Coder Social logo

greenlaw110 / rpc-benchmark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hank-whu/rpc-benchmark

0.0 2.0 0.0 259 KB

java rpc benchmark, 灵感源自 https://www.techempower.com/benchmarks/

License: Apache License 2.0

Java 96.29% Scala 3.33% Thrift 0.38%

rpc-benchmark's Introduction

RPC Benchmark

几乎所有的 RPC 框架都宣称自己是“高性能”的, 那么实际结果到底如何呢, 让我们来做一个性能测试吧.

测试结果

测试说明

  • 仅限于Java.
  • 客户端使用JMH进行压测, 32 线程, 3 轮预热 3 轮测试 每轮 10s
  • 每次运行前都会执行 killall java, 但没有在每轮测试时重启操作系统
  • 所有类库版本在发布时都是最新的, 除非存在bug
  • 所有框架都尽量参考该项目自带的Benchmark实现
  • 将会一直持续, 不定期发布测试结果
  • 更多说明请移步: 怎样对 RPC 进行有效的性能测试

测试用例

  1. boolean existUser(String email), 判断某个 email 是否存在
  2. boolean createUser(User user), 添加一个 User
  3. User getUser(long id), 根据 id 获取一个用户
  4. Page listUser(int pageNo), 获取用户列表

运行说明

  1. 需要两台机器,一台作为客户端,一台作为服务端
  2. 系统要求为 linux x64, 至少 4GB ram
  3. 客户端需要安装 git, jdk 9, scala 12, maven 3
  4. 服务端需要安装 jdk 9
  5. 客户端服务端均需要设置 hosts

10.0.0.88 benchmark-client
10.0.0.99 benchmark-server

  1. 服务端需要添加用户 benchmark, 需要配置成客户端免密登录, 也就是客户端可以通过如下方式访问服务端

ssh benchmark@benchmark-server "ls -lh"

  1. 客户端执行如下命令, 结果输出到 benchmark/benchmark-result

git clone https://github.com/hank-whu/rpc-benchmark.git
cd rpc-benchmark
scala benchmark.scala

开发者必读

  1. cd benchmark-base && mvn install
  2. 配置好 hosts: benchmark-client benchmark-server
  3. 修改或者实现 xxx-server xxx-client
  4. 启动 Server, 然后启动 Client, 确保能不出错跑完所有测试项目
  5. 提交 Pull Request

免责声明

  • 能力所限错误在所难免, 本测试用例及测试结果仅供参考.
  • 如果你认为xx框架的代码或配置存在问题,那么欢迎发起Pull Request.
  • 利益相关: 本测试用例作者同时为 turbo, undertow-async 的作者.

关注微信公众号: rpcBenchmark

rpcBenchmark

rpc-benchmark's People

Contributors

hank-whu avatar andot avatar fengjiachun avatar

Watchers

Gelin Luo avatar James Cloos 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.