lua 프로젝트 레이아웃 변경

This commit is contained in:
freestrings
2019-08-23 11:53:03 +09:00
parent ea7599c012
commit b5c5d6b88e
12 changed files with 99 additions and 108 deletions

View File

@ -0,0 +1,20 @@
require("lib")
local iter;
if arg[1] == nil or arg[1] == '' then
iter = 5000;
else
iter = tonumber(arg[1]);
end
print(string.format("%s - %u", "lua iter", iter));
local file = io.open("../benchmark/example.json", "r");
io.input(file)
local data = io.read("*a");
io.close(file);
local template = compile("$..book[?(@.price<30 && @.category==\"fiction\")]");
for i = 0, iter do
local r = template(data);
-- print(r);
end