From d79793c34fac16b2fb7dbb1e567be1308f987cdb Mon Sep 17 00:00:00 2001 From: James Allen Date: Sat, 29 Aug 2015 08:22:43 +0100 Subject: [PATCH] Monitor get document times --- services/real-time/app/coffee/DocumentUpdaterManager.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/real-time/app/coffee/DocumentUpdaterManager.coffee b/services/real-time/app/coffee/DocumentUpdaterManager.coffee index 8610b454ec..1bc9fd3bc9 100644 --- a/services/real-time/app/coffee/DocumentUpdaterManager.coffee +++ b/services/real-time/app/coffee/DocumentUpdaterManager.coffee @@ -7,11 +7,11 @@ rclient = redis.createClient(settings.redis.web) module.exports = DocumentUpdaterManager = getDocument: (project_id, doc_id, fromVersion, callback = (error, exists, doclines, version) ->) -> - #timer = new metrics.Timer("get-document") + timer = new metrics.Timer("get-document") url = "#{settings.apis.documentupdater.url}/project/#{project_id}/doc/#{doc_id}?fromVersion=#{fromVersion}" logger.log {project_id, doc_id, fromVersion}, "getting doc from document updater" request.get url, (err, res, body) -> - #timer.done() + timer.done() if err? logger.error {err, url, project_id, doc_id}, "error getting doc from doc updater" return callback(err) @@ -55,4 +55,4 @@ module.exports = DocumentUpdaterManager = multi.rpush "pending-updates-list", doc_key multi.exec (error) -> return callback(error) if error? - callback() \ No newline at end of file + callback()