File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -248,23 +248,23 @@ resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-parameter.lua
248248matched res: 1
249249route count: 100000
250250match times: 1000000
251- time used : 0.51699995994568 sec
252- QPS : 1934236
253- each time : 0.51699995994568 ns
251+ time used : 1.1389999389648 sec
252+ QPS : 877963
253+ each time : 1.1389999389648 ns
254254
255255resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-prefix.lua
256256matched res: 500
257257route count: 100000
258258match times: 1000000
259- time used : 0.625 sec
260- QPS : 1600000
259+ time used : 0.54299998283386 sec
260+ QPS : 1841620
261261
262262resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-static.lua
263263matched res: 500
264264route count: 100000
265265match times: 1000000
266- time used : 0.10099983215332 sec
267- QPS : 9901006
266+ time used : 0.10500001907349 sec
267+ QPS : 9523807
268268```
269269
270270[ Back to TOC] ( #table-of-contents )
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ local route_count = 1000 * 100
33local match_times = 1000 * 1000
44
55local routes = {}
6- for i = 1 , 1 do
7- routes [i ] = {paths = {" /user/:name" }, metadata = i }
6+ for i = 1 , route_count do
7+ routes [i ] = {paths = {" /user" .. i .. " /:name" }, metadata = i }
88end
99
1010local rx = radix .new (routes )
@@ -13,7 +13,7 @@ ngx.update_time()
1313local start_time = ngx .now ()
1414
1515local res
16- local path = " /user /gordon"
16+ local path = " /user1 /gordon"
1717for _ = 1 , match_times do
1818 res = rx :match (path )
1919end
You can’t perform that action at this time.
0 commit comments