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