基准测试
Http测试
Erguotou
➜ Test wrk -t12 -c400 -d30s http://0.0.0.0:8081/hello
Running 30s test @ http://0.0.0.0:8081/hello
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.69ms 1.03ms 117.82ms 97.54%
Req/Sec 8.21k 4.53k 13.52k 68.48%
2701628 requests in 30.10s, 349.44MB read
Socket errors: connect 155, read 70, write 0, timeout 0
Requests/sec: 89752.96
Transfer/sec: 11.61MB
➜ Test wrk -t12 -c400 -d30s --latency http://0.0.0.0:8081/hello
Running 30s test @ http://0.0.0.0:8081/hello
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.89ms 1.90ms 126.43ms 96.70%
Req/Sec 7.16k 4.39k 13.00k 46.44%
Latency Distribution
50% 2.73ms
75% 2.96ms
90% 3.35ms
99% 8.07ms
2571271 requests in 30.10s, 333.30MB read
Socket errors: connect 155, read 74, write 0, timeout 0
Requests/sec: 85414.79
Transfer/sec: 11.07MB
Gin
➜ Test wrk -t12 -c400 -d30s http://0.0.0.0:8082/hello
Running 30s test @ http://0.0.0.0:8082/hello
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 5.10ms 24.11ms 1.00s 99.49%
Req/Sec 5.31k 3.64k 22.98k 48.79%
1905011 requests in 30.10s, 218.01MB read
Socket errors: connect 155, read 84, write 0, timeout 0
Requests/sec: 63282.30
Transfer/sec: 7.24MB
➜ Test wrk -t12 -c400 -d30s --latency http://0.0.0.0:8082/hello
Running 30s test @ http://0.0.0.0:8082/hello
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 5.24ms 26.01ms 1.02s 99.53%
Req/Sec 5.32k 3.47k 12.66k 53.40%
Latency Distribution
50% 3.42ms
75% 4.18ms
90% 5.41ms
99% 17.25ms
1901550 requests in 30.07s, 217.62MB read
Socket errors: connect 155, read 59, write 0, timeout 0
Requests/sec: 63238.53
Transfer/sec: 7.24MB
Html渲染测试
Erguotou
➜ Test wrk -t12 -c400 -d30s http://0.0.0.0:8081
Running 30s test @ http://0.0.0.0:8081
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.81ms 5.23ms 137.54ms 93.37%
Req/Sec 7.17k 4.02k 38.17k 64.16%
2357265 requests in 30.10s, 544.44MB read
Socket errors: connect 155, read 73, write 0, timeout 0
Requests/sec: 78310.06
Transfer/sec: 18.09MB
➜ Test wrk -t12 -c400 -d30s --latency http://0.0.0.0:8081
Running 30s test @ http://0.0.0.0:8081
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.19ms 5.94ms 148.89ms 94.66%
Req/Sec 5.96k 3.51k 26.21k 54.90%
Latency Distribution
50% 2.88ms
75% 3.55ms
90% 5.44ms
99% 34.73ms
2138257 requests in 30.10s, 493.86MB read
Socket errors: connect 155, read 25, write 0, timeout 0
Requests/sec: 71038.03
Transfer/sec: 16.41MB
Gin
➜ Test wrk -t12 -c400 -d30s http://0.0.0.0:8082
Running 30s test @ http://0.0.0.0:8082
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 23.39ms 14.52ms 527.53ms 97.52%
Req/Sec 0.87k 449.67 2.35k 61.40%
309982 requests in 30.06s, 72.72MB read
Socket errors: connect 155, read 187, write 0, timeout 0
Requests/sec: 10311.24
Transfer/sec: 2.42MB
➜ Test wrk -t12 -c400 -d30s --latency http://0.0.0.0:8082
Running 30s test @ http://0.0.0.0:8082
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 22.08ms 13.85ms 534.41ms 98.69%
Req/Sec 0.92k 450.04 1.97k 53.33%
Latency Distribution
50% 21.20ms
75% 22.91ms
90% 24.87ms
99% 36.05ms
329183 requests in 30.05s, 77.23MB read
Socket errors: connect 155, read 180, write 0, timeout 0
Requests/sec: 10955.90
Transfer/sec: 2.57MB