Skip to content

Commit c61d4e5

Browse files
committed
test: add perf.lua
1 parent c920f80 commit c61d4e5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/perf.lua

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-- performance test
2+
3+
package.path = '../?.lua;../metalua/src/?.lua;' .. package.path
4+
5+
local FS = require 'file_slurp'
6+
local LPL = require 'lua_parser_loose'
7+
8+
local code = FS.readfile(arg[1] or 'Penlight/lua/pl/xml.lua')
9+
10+
for i=1,10 do
11+
--assert(loadstring(code))
12+
LPL.extract_vars(code, function(op, name, other)
13+
--if op == 'Var' then print(name) end
14+
end)
15+
end

0 commit comments

Comments
 (0)