Merge pull request #1003 from CartoDB/add-create-layergroup-stats

Add create layergroup stats
This commit is contained in:
Eneko Lakasta
2018-07-16 17:54:18 +02:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
@@ -196,8 +196,9 @@ function createLayergroup (mapBackend, userLimitsBackend, pgConnection, affected
const mapParams = { dbuser, dbname, dbpassword, dbhost, dbport };
mapBackend.createLayergroup(mapConfig, mapParams, mapConfigProvider, (err, layergroup) => {
req.profiler.done('createLayergroup');
mapBackend.createLayergroup(mapConfig, mapParams, mapConfigProvider, (err, layergroup, stats = {}) => {
req.profiler.add(stats);
if (err) {
return next(err);
}
@@ -192,8 +192,9 @@ function instantiateLayergroup (mapBackend, userLimitsBackend, pgConnection, aff
rendererParams
);
mapBackend.createLayergroup(mapConfig, rendererParams, mapConfigProvider, (err, layergroup) => {
req.profiler.done('createLayergroup');
mapBackend.createLayergroup(mapConfig, rendererParams, mapConfigProvider, (err, layergroup, stats = {}) => {
req.profiler.add(stats);
if (err) {
return next(err);
}