ELECTRON-730 - Add logic to fetch active network requests from the client to validate (#494)

This commit is contained in:
Kiran Niranjan
2018-09-06 14:52:04 +05:30
committed by Vishwas Shashidhar
parent 18b1cf154b
commit db221204e5
3 changed files with 33 additions and 9 deletions

View File

@@ -152,8 +152,11 @@ electron.ipcMain.on(apiName, (event, arg) => {
break;
}
case apiCmds.optimizeMemoryConsumption:
if (typeof arg.memory === 'object' && typeof arg.cpuUsage === 'object' && typeof arg.memory.workingSetSize === 'number') {
setPreloadMemoryInfo(arg.memory, arg.cpuUsage);
if (typeof arg.memory === 'object'
&& typeof arg.cpuUsage === 'object'
&& typeof arg.memory.workingSetSize === 'number'
&& typeof arg.activeRequests === 'number') {
setPreloadMemoryInfo(arg.memory, arg.cpuUsage, arg.activeRequests);
}
break;
case apiCmds.optimizeMemoryRegister: