This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wrk -d30 -t1 -c1 --latency http://test.com/t.txt | |
Running 30s test @ http://test.com/t.txt | |
1 threads and 1 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 196.78us 152.72us 6.68ms 97.98% | |
Req/Sec 5.25k 670.20 6.17k 74.75% | |
Latency Distribution | |
50% 181.00us | |
75% 223.00us | |
90% 259.00us |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:set ft= ts=4 sw=4 et fdm=marker: | |
use lib 'lib'; | |
use Test::Nginx::Socket::Lua; | |
use Cwd qw(cwd); | |
workers(5); | |
#worker_connections(1014); | |
master_process_enabled(1); | |
#log_level('warn'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
机器配置:macbook pro 15寸,4core/8thread i7 cpu,内存 8G。 | |
先贴上单独用 wrk 压测结果(此时 nginx 的4个 worker 是处于 100% 工作状态)。 | |
$ wrk -d 10 -t 4 -c 1000 --latency http://test.com/ | |
Running 10s test @ http://test.com/ | |
4 threads and 1000 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 162.01ms 308.50ms 1.98s 84.93% | |
Req/Sec 10.61k 1.43k 15.45k 68.50% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google cloud, CPU: 8core Memory: 8G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ./benchmark/run.sh | |
+ '[' -n '' ']' | |
+ worker_cnt=1 | |
+ mkdir -p benchmark/server/logs | |
+ mkdir -p benchmark/fake-apisix/logs | |
+ sudo openresty -p /root/apisix/benchmark/server | |
+ trap onCtrlC INT | |
+ sed -i 's/worker_processes [0-9]*/worker_processes 1/g' conf/nginx.conf | |
+ make run | |
mkdir -p logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== TEST 1: set route(id: 1) | |
--- config | |
location /t { | |
content_by_lua_block { | |
local t = require("lib.test_admin").test | |
local code, body = t('/apisix/admin/routes/1', | |
ngx.HTTP_PUT, | |
[[{ | |
"methods": ["GET"], | |
"upstream": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"node": { | |
"nodes": [{ | |
"value": { | |
"upstream": { | |
"nodes": { | |
"127.0.0.1:1980": 1 | |
}, | |
"type": "roundrobin" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local json_encode = require("cjson.safe").encode | |
local clear_tab = require("table.clear") | |
local tostring = tostring | |
local type = type | |
local pairs = pairs | |
local cached_tab = {} | |
local _M = { | |
version = 0.1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@iZ8vbhq8oa47y8mscofouwZ apisix]# ./benchmark/run.sh | |
+ '[' -n '' ']' | |
+ worker_cnt=1 | |
+ mkdir -p benchmark/server/logs | |
+ mkdir -p benchmark/fake-apisix/logs | |
+ sudo openresty -p /root/apisix/benchmark/server | |
+ trap onCtrlC INT | |
+ sed -i 's/worker_processes [0-9]*/worker_processes 1/g' conf/nginx.conf | |
+ make run | |
mkdir -p logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rain@MBPro ~/Downloads/lua-resty-libr3 master ✔ | |
$ make | |
git clone -b 2.0.2-iresty https://github.com/iresty/r3.git | |
Cloning into 'r3'... | |
remote: Enumerating objects: 29, done. | |
remote: Counting objects: 100% (29/29), done. | |
remote: Compressing objects: 100% (19/19), done. | |
remote: Total 4308 (delta 14), reused 18 (delta 10), pack-reused 4279 | |
Receiving objects: 100% (4308/4308), 1.42 MiB | 548.00 KiB/s, done. | |
Resolving deltas: 100% (3041/3041), done. |
OlderNewer