silvasong edited a comment on issue #4189: invoker memory continues to rise URL: https://github.com/apache/incubator-openwhisk/issues/4189#issuecomment-450476962 @sven-lange-last two hours actions details: ``` var showMem = function(type){ var mem = process.memoryUsage(); var format = function(bytes){ retrun (bytes/1024/1024).toFixed(2)+' MB'; } } var consumeTime = function(count){ var length = 0 ; if(2===count){ length = 17000; }else if(5 === count){ length = 28000; }else if(10 === count){ length = 39000; } sortMethod(length); } function sortMethod(length){ var array = new Array(length); for(var i=0;i<array.length;i++){ array[i] = Math.floor(Math.random()*100000); } var swap = 0; for(i=0;i<array.length;i++){ for(var j=0;j<array.length-i-1;j++){ if(array[j]>array[j+1]){ swap = array[j]; array[j] = array[j+1]; array[j+1]= swap; } } } } var printLog = function(logType){ var times =0 ; if("little" == logType){ times =50; }else if ("normal"==logType){ times = 120; } for (var x = 0 ;x<times; x++) { console.log("this is"+logType+ " log"); } } var createOutput = function(unit){ if(0===unit){ return {"name":""} } var array = new Array(unit-11); for (var i = 0; i < array.length; i++) { array[i] = Math.floor(Math.random()*26)+65; } var value = String.fromCharCode.apply(String,array); return {"name":value}; } function main(args){ try{ if (args.hasOwnProperty("name")) { console.log("input length ::"+args["name"].length); }else{ console.log("default value"); } var array = new Array(190*1024*1024/4); consumeTime(2); printLog("little"); var output= createOutput(200); return output; }catch(err){ console.log(err); showMem("start"); showMem("end"); return {"error":"err"}; } } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
