You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used jmeter to perform a performance pressure test on the sandbox. When the number of concurrent requests is 50, the compile execution time increases with the increase of time. The compile time can even reach 50s. Can you confirm whether the problem is caused by my use or a possible bug? Thank you very much!
The sandbox version is 0.3.0. The test code is as follows:
@RequestMapping(path = "/sync", method = RequestMethod.POST)
public BaseResponse createDataSource() throws ScriptException {
String scriptContent = "function excute(data) {\r\n var reqBody = {\r\n \"isIncrement\":\"false\",\r\n \"cursor\":1,\r\n \"count\": 1\r\n };\r\n return reqBody;\r\n}";
NashornSandbox nashornSandbox = createNashornSandbox();
nashornSandbox.setMaxPreparedStatements(2000);
long compileTime = System.currentTimeMillis();
CompiledScript compiledScript = nashornSandbox.compile(scriptContent);
long endCompileTime = System.currentTimeMillis();
System.out.println("current compile time is: " + (endCompileTime - compileTime));
long startEvalTime = System.currentTimeMillis();
nashornSandbox.eval(compiledScript);
long endEvalTime = System.currentTimeMillis();
System.out.println("current eval time is: " + (endEvalTime - startEvalTime));
BaseResponse response = new BaseResponse();
response.setCode("1111");
response.setMessage("current eval time is :" + (endEvalTime - startEvalTime) + " compile time is: " + (endCompileTime - compileTime));
return response;
}
The text was updated successfully, but these errors were encountered:
Thank you for your reply! Actually, the problem I am facing now is that the sandbox compile method is very slow under high concurrency. I tried to analyze it further and found that the beautifyJs(final String js) method is very time-consuming when there are 100 concurrent requests. I am still trying to analyze it, but I have not made any more progress.
I used jmeter to perform a performance pressure test on the sandbox. When the number of concurrent requests is 50, the compile execution time increases with the increase of time. The compile time can even reach 50s. Can you confirm whether the problem is caused by my use or a possible bug? Thank you very much!
The sandbox version is 0.3.0. The test code is as follows:
The text was updated successfully, but these errors were encountered: