mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Upgrade metrics
This commit is contained in:
parent
33df3346f8
commit
54af5fec96
3 changed files with 12 additions and 2 deletions
|
@ -11,7 +11,6 @@ server = express()
|
|||
bodyParser = require('body-parser')
|
||||
metrics = require("metrics-sharelatex")
|
||||
metrics.initialize("spelling")
|
||||
metrics.mongodb.monitor(Path.resolve(__dirname + "/node_modules/mongojs/node_modules/mongodb"), logger)
|
||||
metrics.memory.monitor(logger)
|
||||
HealthCheckController = require("./app/js/HealthCheckController")
|
||||
|
||||
|
|
|
@ -29,4 +29,14 @@ module.exports = LearnedWordsManager =
|
|||
mongoCache.set(user_token, words)
|
||||
callback null, words
|
||||
|
||||
|
||||
|
||||
metrics.timeAsyncMethod(
|
||||
LearnedWordsManager, 'learnWord',
|
||||
'LearnedWordsManager.learnWord',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
LearnedWordsManager, 'getLearnedWords',
|
||||
'LearnedWordsManager.getLearnedWords',
|
||||
logger
|
||||
)
|
||||
|
|
|
@ -23,6 +23,7 @@ describe "LearnedWordsManager", ->
|
|||
log:->
|
||||
err:->
|
||||
info:->
|
||||
'metrics-sharelatex': {timeAsyncMethod: sinon.stub(), inc: sinon.stub()}
|
||||
|
||||
describe "learnWord", ->
|
||||
beforeEach ->
|
||||
|
|
Loading…
Reference in a new issue