@@ -0,0 +1,1489 @@
+package com.github.brandonbai.smartmonitor;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.luaj.vm2.Globals;%0Aimport org.luaj.vm2.LuaValue;%0Aimport org.luaj.vm2.lib.jse.JsePlatform;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0Aimport javax.script.ScriptEngine;%0Aimport javax.script.ScriptEngineManager;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0Apublic class LuaJTest %7B%0A%0A    @Test%0A    public void test() %7B%0A        int size = 100000;%0A%0A        Globals globals = JsePlatform.standardGlobals();%0A        long start = System.currentTimeMillis();%0A        for (int i = 0; i %3C size; i++) %7B%0A            String luaStr = String.format(%22return %25d %3E %25d%22, i, i+1);%0A            LuaValue chunk = globals.load(luaStr);%0A            chunk.call().toboolean();%0A        %7D%0A        long end = System.currentTimeMillis();%0A        System.out.printf(%22lua%EF%BC%9A%25d ms%5Cn%22, end - start);%0A%0A        ScriptEngineManager sem = new ScriptEngineManager();%0A        ScriptEngine scriptEngine = sem.getEngineByName(%22JavaScript%22);%0A        start = System.currentTimeMillis();%0A        for (int i = 0; i %3C size; i++) %7B%0A            String jsStr = String.format(%22%25d %3E %25d%22, i, i+1);%0A            try%7B%0A                scriptEngine.eval(jsStr);%0A            %7Dcatch (Exception e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D%0A        end = System.currentTimeMillis();%0A        System.out.printf(%22js%EF%BC%9A%25d ms%5Cn%22 ,end - start);%0A%0A    %7D%0A%7D%0A

add lua test