Add option to log all query times
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
9d03d9b59c
commit
f400d39466
2 changed files with 13 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue