php和openresty效率,openresty say_hello 性能测试
openresty
route:get("/say_hello", function(self)
ngx.say('hello')
end)
測試,注意關閉 #lua_code_cache off;
$ ./wrk -t12 -c100 -d30s http://localhost:6699/say_hello
Running 30s test @ http://localhost:6699/say_hello
12 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 8.91ms 26.32ms 361.12ms 93.81%
Req/Sec 3.48k 1.49k 19.27k 81.68%
1228717 requests in 30.10s, 250.71MB read
Requests/sec: 40823.76
Transfer/sec: 8.33MB
spring boot
@RequestMapping(value = "/say_hello")
public String sayHello(){
return "hello";
}
測試
$ ./wrk -t12 -c100 -d30s http://localhost:9000/web/say_hello
Running 30s test @ http://localhost:9000/web/say_hello
12 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 22.53ms 48.40ms 636.73ms 90.86%
Req/Sec 1.06k 424.26 4.11k 69.68%
377705 requests in 30.08s, 53.02MB read
Requests/sec: 12558.31
Transfer/sec: 1.76MB
大概是 spring boot 的4倍
總結
以上是生活随笔為你收集整理的php和openresty效率,openresty say_hello 性能测试的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 余庆发酵小叶苦丁茶是传销吗?喝多对人体有
- 下一篇: php sql 二次注入,espcms