mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
measuring how much time does autocomplete building takes
This commit is contained in:
@@ -102,11 +102,13 @@ function assertArguments() {
|
||||
async function stopWatch(what, func) {
|
||||
const start = new Date();
|
||||
|
||||
await func();
|
||||
const ret = await func();
|
||||
|
||||
const tookMs = new Date().getTime() - start.getTime();
|
||||
|
||||
console.log(`${what} took ${tookMs}ms`);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user