add timer info

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2026-04-23 12:49:41 +02:00
parent 21b34a6fa7
commit 40e550f1c3
23 changed files with 194 additions and 76 deletions
+14
View File
@@ -0,0 +1,14 @@
const allTimers = [];
async function timer(name, elapsed) {
allTimers.push([name, Math.round(elapsed)]);
}
async function logTimers() {
allTimers.sort((a, b) => b[1] - a[1]);
const filteredTimers = allTimers.filter((t) => t[1] > 50);
log('timers', filteredTimers);
// xhrPost(`${window.api}/log`, { debug: JSON.stringify(filteredTimers) });
}
window.timer = timer;