mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-08 05:34:23 +08:00
[client-app] Log duration of db ANALYZE query
Summary: See title Test Plan: manual Reviewers: mark, halla, evan Reviewed By: halla, evan Differential Revision: https://phab.nylas.com/D4290
This commit is contained in:
parent
ec51e982eb
commit
caac7cd247
1 changed files with 3 additions and 1 deletions
|
@ -223,13 +223,15 @@ class DatabaseStore extends NylasStore {
|
|||
_runDatabaseAnalyze() {
|
||||
const builder = new DatabaseSetupQueryBuilder();
|
||||
const queries = builder.analyzeQueries();
|
||||
const start = Date.now()
|
||||
const step = () => {
|
||||
const query = queries.shift();
|
||||
if (query) {
|
||||
console.debug(DEBUG_TO_LOG, `DatabaseStore: ${query}`);
|
||||
this._executeInBackground(query, []).then(step);
|
||||
} else {
|
||||
console.log(`Completed ANALYZE of database`);
|
||||
const msec = Date.now() - start
|
||||
console.log(`Completed ANALYZE of database - took ${msec}msec`);
|
||||
}
|
||||
}
|
||||
step();
|
||||
|
|
Loading…
Add table
Reference in a new issue