overleaf/services/web/app/coffee/infrastructure/RandomLogging.coffee
2017-04-03 16:18:30 +01:00

6 lines
221 B
CoffeeScript

_ = require('underscore')
metrics = require('metrics-sharelatex')
do trackOpenSockets = ->
metrics.gauge("http.open-sockets", _.size(require('http').globalAgent.sockets.length), 0.5)
setTimeout(trackOpenSockets, 1000)