mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
@@ -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;
|
||||
Reference in New Issue
Block a user