From c2c367cc140b331de84cb265eaa2459d48f8c3e4 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 1 Sep 2018 15:41:05 +0300 Subject: [PATCH] Add some simple (temporary) logging of placeholder timing --- controller/placeholder.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/controller/placeholder.js b/controller/placeholder.js index 84637116..20e713c0 100644 --- a/controller/placeholder.js +++ b/controller/placeholder.js @@ -228,8 +228,17 @@ function setup(placeholderService, do_geometric_filters_apply, should_execute) { return next(); } const initialTime = debugLog.beginTimer(req); + const start = Date.now(); placeholderService(req, (err, results) => { + const requestTime = Date.now() - start; + + logger.info({ + time: requestTime, + query: req.query, + service: 'placeholder', + }); + if (err) { // push err.message or err onto req.errors req.errors.push( _.get(err, 'message', err));