diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 338a2a3f..362ed906 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -530,9 +530,15 @@ var CartodbWindshaft = function(serverOptions) { } else { res.send(response, 200); } + if ( req.profiler && req.profiler.statsd_client) { + req.profiler.sendStats(); + } } ws.post(template_baseurl + '/:template_id', function(req, res) { + if ( req.profiler && req.profiler.statsd_client) { + req.profiler.start('windshaft-cartodb.instance_template_post'); + } Step( function() { if ( ! req.headers['content-type'] || req.headers['content-type'].split(';')[0] != 'application/json') { @@ -550,6 +556,9 @@ var CartodbWindshaft = function(serverOptions) { * callback query argument is mandartoy */ ws.get(template_baseurl + '/:template_id/jsonp', function(req, res) { + if ( req.profiler && req.profiler.statsd_client) { + req.profiler.start('windshaft-cartodb.instance_template_get'); + } Step( function() { if ( req.query.callback === undefined || req.query.callback.length === 0) {