项目作者: prongbang

项目描述 :
Loadtest Actix vs Fiber | Rust vs Golang
高级语言: Rust
项目地址: git://github.com/prongbang/actix-vs-fiber.git
创建时间: 2021-04-16T15:52:01Z
项目社区:https://github.com/prongbang/actix-vs-fiber

开源协议:

下载


Actix vs Fiber | Rust vs Golang

actix-api

  • Run
  1. $ cd actix-api
  2. $ cargo run
  • Loadtest
  1. $ wrk -c 10000 -d 60 -t 4 http://localhost:4000
  2. Running 1m test @ http://localhost:4000
  3. 4 threads and 10000 connections
  4. Thread Stats Avg Stdev Max +/- Stdev
  5. Latency 39.63ms 30.72ms 840.48ms 98.15%
  6. Req/Sec 16.06k 4.19k 24.33k 83.81%
  7. 3764268 requests in 1.00m, 337.45MB read
  8. Socket errors: connect 7450, read 34149, write 0, timeout 0
  9. Requests/sec: 62633.90
  10. Transfer/sec: 5.61MB

fiber-api

  • Run
  1. $ cd fiber-api
  2. $ go run main.go
  • Loadtest
  1. $ wrk -c 10000 -d 60 -t 4 http://localhost:3000
  2. Running 1m test @ http://localhost:3000
  3. 4 threads and 10000 connections
  4. Thread Stats Avg Stdev Max +/- Stdev
  5. Latency 264.51ms 132.56ms 1.99s 78.60%
  6. Req/Sec 2.33k 1.06k 4.56k 59.65%
  7. 539230 requests in 1.00m, 2.65GB read
  8. Socket errors: connect 7450, read 45176, write 0, timeout 0
  9. Requests/sec: 8975.44
  10. Transfer/sec: 45.18MB