gost / benchmarks

MIT License
1 stars 0 forks source link

wrk #1

Open bertt opened 6 years ago

bertt commented 6 years ago

use wrk/wrk instead of ab for benchmark testing?

https://github.com/wg/wrk

sample:

$ wrk -t12 -c400 -d30s http://127.0.0.1:8080/v1.0
Running 30s test @ http://127.0.0.1:8080/v1.0
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    91.28ms   42.27ms 620.09ms   76.34%
    Req/Sec   358.49     95.67     1.42k    74.44%
  126974 requests in 30.09s, 123.15MB read
  Socket errors: connect 0, read 5, write 0, timeout 0
Requests/sec:   4220.31

pro:

con:

todo:

bertt commented 6 years ago

reference: 2107 request/s other test: 4089 request/s

bertt commented 6 years ago

running wrk in docker:

$ docker run --rm --net=host williamyeh/wrk -t12 -c400 -d30s http://127.0.0.1:8080/v1.0
bertt commented 6 years ago

Posting sample:

$ wrk -t12 -c400 -d30s -s post.lua http://127.0.0.1:8080/v1.0/Locations

Met post.lua file:

wrk.method = "POST"
wrk.body   = '{"name": "Somewhere","description": "my backyard","encodingType": "application/vnd.geo+json","location": {"type": "Point","coordinates": [-117.123,54.123]}}'
wrk.headers["Content-Type"] = "application/json"

Result on my machine: Requests/sec: 1168.43