mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
285 B
18 lines
285 B
3 years ago
|
local function target()
|
||
|
ngx.re.find("hello, world.", [[\w+\.]], "jo")
|
||
|
end
|
||
|
for i = 1, 100 do
|
||
|
target()
|
||
|
end
|
||
|
|
||
|
collectgarbage()
|
||
|
|
||
|
ngx.update_time()
|
||
|
local begin = ngx.now()
|
||
|
local N = 1e7
|
||
|
for i = 1, N do
|
||
|
target()
|
||
|
end
|
||
|
ngx.update_time()
|
||
|
|
||
|
ngx.say("elapsed: ", (ngx.now() - begin) / N)
|