mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add comments for redis metrics
This commit is contained in:
parent
21824d49da
commit
2b72ec49a1
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,7 @@ module.exports = RedisManager =
|
||||||
logger.error {err: error, doc_id: doc_id, docLines: docLines}, error.message
|
logger.error {err: error, doc_id: doc_id, docLines: docLines}, error.message
|
||||||
return callback(error)
|
return callback(error)
|
||||||
docHash = RedisManager._computeHash(docLines)
|
docHash = RedisManager._computeHash(docLines)
|
||||||
|
# record bytes sent to redis
|
||||||
metrics.summary "redis.docLines", docLines.length, {status: "set"}
|
metrics.summary "redis.docLines", docLines.length, {status: "set"}
|
||||||
logger.log {project_id, doc_id, version, docHash, pathname, projectHistoryId}, "putting doc in redis"
|
logger.log {project_id, doc_id, version, docHash, pathname, projectHistoryId}, "putting doc in redis"
|
||||||
RedisManager._serializeRanges ranges, (error, ranges) ->
|
RedisManager._serializeRanges ranges, (error, ranges) ->
|
||||||
|
@ -90,6 +91,7 @@ module.exports = RedisManager =
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
length = response?[0]
|
length = response?[0]
|
||||||
if length > 0
|
if length > 0
|
||||||
|
# record bytes freed in redis
|
||||||
metrics.summary "redis.docLines", length, {status: "del"}
|
metrics.summary "redis.docLines", length, {status: "del"}
|
||||||
multi = rclient.multi()
|
multi = rclient.multi()
|
||||||
multi.srem keys.docsInProject(project_id:project_id), doc_id
|
multi.srem keys.docsInProject(project_id:project_id), doc_id
|
||||||
|
|
Loading…
Reference in a new issue