diff --git a/lib/cartodb/controllers/named_static_maps.js b/lib/cartodb/controllers/named_static_maps.js index b1395eb0..9f604a08 100644 --- a/lib/cartodb/controllers/named_static_maps.js +++ b/lib/cartodb/controllers/named_static_maps.js @@ -181,7 +181,12 @@ NamedStaticMapsController.prototype.named = function(req, res) { self.staticMapBackend.getImage(staticImageReq, width, height, imageOpts.bounds, this); } }, - function handleImage(err, image, headers/*, stats*/) { + function handleImage(err, image, headers, stats) { + if (req.profiler) { + req.profiler.done('render-' + format); + req.profiler.add(stats || {}); + } + if (err) { if (!err.error) { err.error = err.message;