From b41119a37472d8b0a6b2fb04e86118bc5ee3c8c5 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 7 Feb 2015 23:32:42 -0500 Subject: [PATCH] show seconds like search page --- public/language/en_GB/users.json | 2 +- src/notifications.js | 10 ---------- src/user/search.js | 5 +---- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/public/language/en_GB/users.json b/public/language/en_GB/users.json index 683ad7e155..0f3687c9ed 100644 --- a/public/language/en_GB/users.json +++ b/public/language/en_GB/users.json @@ -5,7 +5,7 @@ "search": "Search", "enter_username": "Enter a username to search", "load_more": "Load More", - "users-found-search-took": "%1 user(s) found! Search took %2 ms.", + "users-found-search-took": "%1 user(s) found! Search took %2 seconds.", "filter-by": "Filter By", "online-only": "Online only", "picture-only": "Picture only" diff --git a/src/notifications.js b/src/notifications.js index 96502508f7..5d10686212 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -270,12 +270,6 @@ var async = require('async'), }; Notifications.prune = function() { - var start = process.hrtime(); - - if (process.env.NODE_ENV === 'development') { - winston.info('[notifications.prune] Removing expired notifications from the database.'); - } - var week = 604800000, numPruned = 0; @@ -307,10 +301,6 @@ var async = require('async'), if (err) { return winston.error('Encountered error pruning notifications: ' + err.message); } - - if (process.env.NODE_ENV === 'development') { - winston.info('[notifications.prune] Notification pruning completed. ' + numPruned + ' expired notification' + (numPruned !== 1 ? 's' : '') + ' removed.'); - } }); }); }; diff --git a/src/user/search.js b/src/user/search.js index a593258f11..20bbec2258 100644 --- a/src/user/search.js +++ b/src/user/search.js @@ -46,11 +46,8 @@ module.exports = function(User) { User.getUsers(uids, uid, next); }, function(userData, next) { - - var diff = process.hrtime(startTime); - var timing = (diff[0] * 1e3 + diff[1] / 1e6).toFixed(1); var data = { - timing: timing, + timing: (process.elapsedTimeSince(startTime) / 1000).toFixed(2), users: userData, matchCount: matchCount };