Append stats to profiler

This commit is contained in:
Raul Ochoa
2015-04-28 16:14:30 +02:00
parent 1a66f96379
commit 7580081a64
+6 -1
View File
@@ -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;