feat: memory panel sparkline history
This commit is contained in:
parent
fac3b27679
commit
3582ea2656
2 changed files with 47 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ QtObject {
|
|||
property real memAvailGb: 0
|
||||
property real memCachedGb: 0
|
||||
property real memBuffersGb: 0
|
||||
property var memHistory: []
|
||||
|
||||
// ── Disk ─────────────────────────────────────────────────────────────
|
||||
property var diskMounts: []
|
||||
|
|
@ -89,6 +90,8 @@ QtObject {
|
|||
root.memAvailGb = ev.avail_gb;
|
||||
root.memCachedGb = ev.cached_gb;
|
||||
root.memBuffersGb = ev.buffers_gb;
|
||||
const h = root.memHistory.concat([ev.percent]);
|
||||
root.memHistory = h.length > 30 ? h.slice(h.length - 30) : h;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue