Add option to log all query times

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
trevor-signal 2023-07-14 20:52:20 -04:00 committed by Fedor Indutnyy
parent 9d03d9b59c
commit f400d39466
2 changed files with 13 additions and 3 deletions

View file

@ -96,9 +96,9 @@ port.on('message', async ({ seq, request }: WrappedWorkerRequest) => {
throw new Error(`Invalid sql method: ${method}`);
}
const start = Date.now();
const start = performance.now();
const result = await method.apply(db, request.args);
const end = Date.now();
const end = performance.now();
respond(seq, undefined, { result, duration: end - start });
} else {