diff --git a/core/server/apps/amp/lib/helpers/amp_content.js b/core/server/apps/amp/lib/helpers/amp_content.js index b1e9a4f1a8..5b376034d6 100644 --- a/core/server/apps/amp/lib/helpers/amp_content.js +++ b/core/server/apps/amp/lib/helpers/amp_content.js @@ -120,7 +120,9 @@ function getAmperizeHTML(html, post) { return; } - var Amperize = require('amperize'); + var Amperize = require('amperize'), + startedAtMoment = moment(); + amperize = amperize || new Amperize(); // make relative URLs abolute @@ -129,6 +131,8 @@ function getAmperizeHTML(html, post) { if (!amperizeCache[post.id] || moment(new Date(amperizeCache[post.id].updated_at)).diff(new Date(post.updated_at)) < 0) { return new Promise(function (resolve) { amperize.parse(html, function (err, res) { + logging.info('amp.parse', post.url, moment().diff(startedAtMoment, 'ms') + 'ms'); + if (err) { if (err.src) { logging.error(new errors.GhostError({