Add opt-in slow SQL and database diagnostics
This commit is contained in:
@@ -184,6 +184,13 @@ record an `ec:navigation` performance measure. `npm run benchmark:leaderboard`
|
||||
uses an isolated synthetic database; pass `-- --scenario all --baseline-ref <commit>`
|
||||
to compare full response parity and warm query timings with an earlier revision.
|
||||
|
||||
Set `EC_SLOW_SQL_MS=20` to log runtime statements taking at least 20 ms; bound
|
||||
values and string literals are omitted. It is disabled by default. Before and
|
||||
after database changes, capture these timings under the same fleet load and run
|
||||
`npm run diagnostics:database -- /data/cherry.db` inside the controller to report
|
||||
the largest tables/indexes, database and WAL sizes, and free pages. This command
|
||||
opens an existing database read-only and does not run app migrations.
|
||||
|
||||
Local controller
|
||||
metadata defaults to `./data/cherry.db`; use a separate test database when
|
||||
exercising enrollment. Production agent transport requires HTTPS.
|
||||
|
||||
Reference in New Issue
Block a user