upgrade & opt

- flutter 3.0.1
- show snackbar when no server to ping
- server detail page replace nice to iowait
- make script show stdout when error
This commit is contained in:
Junyuan Feng
2022-05-21 20:39:52 +08:00
parent b4d42eecf3
commit 228f228d44
14 changed files with 53 additions and 23 deletions

View File

@@ -45,5 +45,12 @@ class Cpu2Status {
return used.isNaN ? 0 : used * 100;
}
double get iowait {
if (now.length != pre.length) return 0;
final delta = now[0].iowait - pre[0].iowait;
final used = delta / totalDelta;
return used.isNaN ? 0 : used * 100;
}
double get idle => 100 - usedPercent();
}