From f5c24cf252c0717a9c78ccc90199840854cc7c66 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 19 Sep 2013 14:34:03 +0100 Subject: [PATCH] Add more profile slots --- lib/cartodb/server_options.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index 6ff68e82..da4d5318 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -266,6 +266,7 @@ module.exports = function(){ // take place before proceeding. Error will be logged // asyncronously cartoData.incMapviewCount(username, mapconfig.stat_tag, function(err) { + if (req.profiler) req.profiler.done('incMapviewCount'); if ( err ) console.log("ERROR: failed to increment mapview count for user '" + username + "': " + err); done(); }); @@ -283,12 +284,14 @@ module.exports = function(){ var cacheKey = dbName + ':' + token; me.affectedTables(usr, key, sql, function(err, tableNames) { + if (req.profiler) req.profiler.done('affectedTables'); if ( err ) { done(err); return; } var cacheChannel = me.buildCacheChannel(dbName,tableNames); me.channelCache[cacheKey] = cacheChannel; // store for caching // find last updated me.findLastUpdated(usr, key, tableNames, function(err, lastUpdated) { + if (req.profiler) req.profiler.done('findLastUpdated'); if ( err ) { done(err); return; } response.layergroupid = response.layergroupid + ':' + lastUpdated; // use epoch response.last_updated = new Date(lastUpdated).toISOString(); // TODO: use ISO format