リファクタリング (#4587)
* Use I cap * Avoid _ * Use default value instead of optional boolean * Bye useless variable * Bye verbose try-catch
This commit is contained in:
parent
97bff010a8
commit
054220db70
8 changed files with 17 additions and 37 deletions
|
@ -56,20 +56,12 @@ function cpuUsage() {
|
|||
|
||||
// MEMORY(excl buffer + cache) STAT
|
||||
async function usedMem() {
|
||||
try {
|
||||
const data = await sysUtils.mem();
|
||||
return data.active;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
const data = await sysUtils.mem();
|
||||
return data.active;
|
||||
}
|
||||
|
||||
// TOTAL MEMORY STAT
|
||||
async function totalMem() {
|
||||
try {
|
||||
const data = await sysUtils.mem();
|
||||
return data.total;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
const data = await sysUtils.mem();
|
||||
return data.total;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue