✨
This commit is contained in:
		
							parent
							
								
									43a7eb233c
								
							
						
					
					
						commit
						d4d3316d18
					
				
					 1 changed files with 24 additions and 26 deletions
				
			
		| 
						 | 
					@ -48,9 +48,9 @@ async function cpuUsage() {
 | 
				
			||||||
	try {
 | 
						try {
 | 
				
			||||||
		const data = await sysUtils.currentLoad();
 | 
							const data = await sysUtils.currentLoad();
 | 
				
			||||||
		return Math.floor(data.currentload);
 | 
							return Math.floor(data.currentload);
 | 
				
			||||||
  }
 | 
						} catch (error) {
 | 
				
			||||||
  catch(error) {
 | 
					 | 
				
			||||||
		console.error(error);
 | 
							console.error(error);
 | 
				
			||||||
 | 
							throw error;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -59,8 +59,7 @@ async function freeMem() {
 | 
				
			||||||
	try {
 | 
						try {
 | 
				
			||||||
		const data = await sysUtils.mem();
 | 
							const data = await sysUtils.mem();
 | 
				
			||||||
		return data.active;
 | 
							return data.active;
 | 
				
			||||||
  }
 | 
						} catch (error) {
 | 
				
			||||||
  catch(error) {
 | 
					 | 
				
			||||||
		console.error(error);
 | 
							console.error(error);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -70,8 +69,7 @@ async function totalMem() {
 | 
				
			||||||
	try {
 | 
						try {
 | 
				
			||||||
		const data = await sysUtils.mem();
 | 
							const data = await sysUtils.mem();
 | 
				
			||||||
		return data.total;
 | 
							return data.total;
 | 
				
			||||||
  }
 | 
						} catch (error) {
 | 
				
			||||||
  catch(error) {
 | 
					 | 
				
			||||||
		console.error(error);
 | 
							console.error(error);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue