From ad59c24f7793c3b922f17f7c1bc0b7af30dbc3df Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 2 Mar 2024 17:53:43 -0600 Subject: [PATCH] docs: add debugging SQLite information --- docs/debugging.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/debugging.md b/docs/debugging.md index 84e057ac..6abc513d 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -14,4 +14,14 @@ To access the debugger remotely, you can use SSH port forwarding. Run this comma ssh -L 9229:localhost:9229 @ ``` -Then, in Chromium, go to `chrome://inspect` and the Ditto server should be available. \ No newline at end of file +Then, in Chromium, go to `chrome://inspect` and the Ditto server should be available. + +## SQLite performance + +To track slow queries, first set `DEBUG=ditto:sqlite.worker` in the environment so only SQLite logs are shown. + +Then, grep for any logs above 0.001s: + +```sh +journalctl -fu ditto | grep -v '(0.00s)' +``` \ No newline at end of file