aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island/perf/test_perf.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-13 11:30:07 +0200
committerDanilo M. <danix@danix.xyz>2026-10-13 11:30:07 +0200
commit6849707c43bb8b87f9913fc26b6a69d51777d209 (patch)
treefdf165dd2da7783bf4cadd6fc78e72ef32e69dbe /desktop/island/perf/test_perf.js
parent2bec673df8ebcb756ec9b605dd7942018a32fdcb (diff)
downloadquickshell-6849707c43bb8b87f9913fc26b6a69d51777d209.tar.gz
quickshell-6849707c43bb8b87f9913fc26b6a69d51777d209.zip
fix(perf): review findings in the service and the panel
- The panel loads only while open. Its models are fresh arrays every sample, so a hidden instance rebuilt its rows every 2s for the whole session. - The public IP fetch never kills one already running, and waits 30 minutes from the last attempt, not the last success: a rate-limited or offline fetch was retried every minute. - curl -4, so an IPv6 answer cannot silently stall the VPN check. - CPU load sums only the first eight /proc/stat fields. guest and guest_nice are already inside user and nice, and counting them again read high while VMs ran. - df gets timeout -k; the VRAM scan is not restarted over itself. - The GPU name joins the host constants in Perf.qml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/island/perf/test_perf.js')
-rw-r--r--desktop/island/perf/test_perf.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop/island/perf/test_perf.js b/desktop/island/perf/test_perf.js
index c336cf0..5f39f5d 100644
--- a/desktop/island/perf/test_perf.js
+++ b/desktop/island/perf/test_perf.js
@@ -35,6 +35,8 @@ assert.strictEqual(t.length, 3);
assert.deepStrictEqual(t[0], { total: 1000, idle: 850 });
assert.deepStrictEqual(t[1], { total: 500, idle: 425 });
assert.deepStrictEqual(P.cpuTimes(""), []);
+// guest and guest_nice are already inside user and nice: not added twice.
+assert.deepStrictEqual(P.cpuTimes("cpu 100 0 0 100 0 0 0 0 80 0"), [{ total: 200, idle: 100 }]);
// load: busy share of the delta; no prev, or no time passed, is null.
assert.strictEqual(P.load({ total: 1000, idle: 850 }, { total: 1100, idle: 925 }), 25);