Added a timer for Start Ghost test utility

- Show us how long it takes to start Ghost in each acceptance/regression test that uses this method
- Useful for debugging slow tests, and also Ghost boot time!
This commit is contained in:
Hannah Wolfe 2020-03-20 11:14:42 +00:00
parent d229cf83a4
commit 297c773f2a

View File

@ -792,6 +792,7 @@ var ghostServer;
* @TODO: tidy up the tmp folders
*/
startGhost = function startGhost(options) {
console.time('Start Ghost');
options = _.merge({
redirectsFile: true,
forceStart: false,
@ -894,6 +895,7 @@ startGhost = function startGhost(options) {
})
.then((keys) => {
module.exports.existingData.apiKeys = keys.toJSON(module.exports.context.internal);
console.timeEnd('Start Ghost');
})
.return(ghostServer);
});
@ -975,6 +977,7 @@ startGhost = function startGhost(options) {
})
.then((keys) => {
module.exports.existingData.apiKeys = keys.toJSON();
console.timeEnd('Start Ghost');
})
.return(ghostServer);
});