File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -247,38 +247,38 @@ $ make bench
247247resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-parameter.lua
248248matched res: 1
249249route count: 100000
250- match times: 1000000
251- time used : 0.46799993515015 sec
252- QPS : 2136752
253- each time : 0.46799993515015 ns
250+ match times: 10000000
251+ time used : 3.3849999904633 sec
252+ QPS : 2954209
253+ each time : 0.33849999904633 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.43799996376038 sec
260- QPS : 2283105
259+ time used : 0.4229998588562 sec
260+ QPS : 2364066
261261
262262resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-static.lua
263263matched res: 500
264264route count: 100000
265- match times: 1000000
266- time used : 0.082000017166138 sec
267- QPS : 12195119
265+ match times: 10000000
266+ time used : 0.78799986839294 sec
267+ QPS : 12690357
268268
269269resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-hosts.lua
270270matched res: 500
271271route count: 1000
272272match times: 100000
273- time used : 1.6740000247955 sec
274- QPS : 59737
273+ time used : 1.6989998817444 sec
274+ QPS : 58858
275275
276276resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-wildcard-hosts.lua
277277matched res: 500
278278route count: 1000
279- match times: 5000
280- time used : 0.11899995803833 sec
281- QPS : 42016
279+ match times: 50000
280+ time used : 1.2469999790192 sec
281+ QPS : 40096
282282```
283283
284284[ Back to TOC] ( #table-of-contents )
Original file line number Diff line number Diff line change 11local radix = require (" resty.radixtree" )
22local route_count = 1000 * 100
3- local match_times = 1000 * 1000
3+ local match_times = 1000 * 1000 * 10
44
55local routes = {}
66for i = 1 , route_count do
Original file line number Diff line number Diff line change 11local radix = require (" resty.radixtree" )
22local route_count = 1000 * 100
3- local match_times = 1000 * 1000
3+ local match_times = 1000 * 1000 * 10
44
55local routes = {}
66for i = 1 , route_count do
Original file line number Diff line number Diff line change 11local radix = require (" resty.radixtree" )
22local route_count = 1000 * 1
3- local match_times = 1000 * 5
3+ local match_times = 1000 * 50
44
55local path = " /12345"
66local routes = {}
You can’t perform that action at this time.
0 commit comments