mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
change metrics a bit for promethious
This commit is contained in:
parent
5eaf4c8551
commit
186f321391
2 changed files with 4 additions and 4 deletions
|
@ -11,11 +11,11 @@ class ASpellWorker
|
|||
@count = 0
|
||||
@pipe = child_process.spawn("aspell", ["pipe", "-t", "--encoding=utf-8", "-d", language])
|
||||
logger.info process: @pipe.pid, lang: @language, "starting new aspell worker"
|
||||
metrics.inc "aspellWorker-start-" + @language
|
||||
metrics.inc "aspellWorker-start", 1, {method: @language}
|
||||
@pipe.on 'exit', () =>
|
||||
@state = 'killed'
|
||||
logger.info process: @pipe.pid, lang: @language, "aspell worker has exited"
|
||||
metrics.inc "aspellWorker-exit-" + @language
|
||||
metrics.inc "aspellWorker-exit" , 1, {method: @language}
|
||||
@pipe.on 'close', () =>
|
||||
@state = 'closed' unless @state == 'killed'
|
||||
if @callback?
|
||||
|
|
|
@ -17,10 +17,10 @@ module.exports = LearnedWordsManager =
|
|||
getLearnedWords: (user_token, callback = (error, words)->) ->
|
||||
mongoCachedWords = mongoCache.get(user_token)
|
||||
if mongoCachedWords?
|
||||
metrics.inc "mongoCache-hit", 0.1
|
||||
metrics.inc "mongoCache", 0.1, {status: "hit"}
|
||||
return callback(null, mongoCachedWords)
|
||||
|
||||
metrics.inc "mongoCache-miss", 0.1
|
||||
metrics.inc "mongoCache", 0.1, {status: "miss"}
|
||||
logger.info user_token:user_token, "mongoCache miss"
|
||||
|
||||
db.spellingPreferences.findOne token: user_token, (error, preferences) ->
|
||||
|
|
Loading…
Reference in a new issue