Skip to content

Commit a244953

Browse files
committed
run more times if the QPS is higher.
1 parent 2be4414 commit a244953

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -247,38 +247,38 @@ $ make bench
247247
resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-parameter.lua
248248
matched res: 1
249249
route 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

255255
resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-prefix.lua
256256
matched res: 500
257257
route count: 100000
258258
match times: 1000000
259-
time used : 0.43799996376038 sec
260-
QPS : 2283105
259+
time used : 0.4229998588562 sec
260+
QPS : 2364066
261261

262262
resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-static.lua
263263
matched res: 500
264264
route 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

269269
resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-hosts.lua
270270
matched res: 500
271271
route count: 1000
272272
match times: 100000
273-
time used : 1.6740000247955 sec
274-
QPS : 59737
273+
time used : 1.6989998817444 sec
274+
QPS : 58858
275275

276276
resty -I=./lib -I=./deps/share/lua/5.1 benchmark/match-wildcard-hosts.lua
277277
matched res: 500
278278
route 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)

benchmark/match-parameter.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local radix = require("resty.radixtree")
22
local route_count = 1000 * 100
3-
local match_times = 1000 * 1000
3+
local match_times = 1000 * 1000 * 10
44

55
local routes = {}
66
for i = 1, route_count do

benchmark/match-static.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local radix = require("resty.radixtree")
22
local route_count = 1000 * 100
3-
local match_times = 1000 * 1000
3+
local match_times = 1000 * 1000 * 10
44

55
local routes = {}
66
for i = 1, route_count do

benchmark/match-wildcard-hosts.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local radix = require("resty.radixtree")
22
local route_count = 1000 * 1
3-
local match_times = 1000 * 5
3+
local match_times = 1000 * 50
44

55
local path = "/12345"
66
local routes = {}

0 commit comments

Comments
 (0)