Skip to content

Instantly share code, notes, and snippets.

View rhyslbw's full-sized avatar

Rhys Bartels-Waller rhyslbw

  • Input Output Global
  • UK
  • 12:39 (UTC +01:00)
View GitHub Profile
# on the server: server.coffee
Metrics = (name, aggregationQuery, collection, interval) ->
@name = name
@aggregationQuery = aggregationQuery
@collection = collection
@interval = interval or 1000*10
@_collectionName = 'metrics-transport'
Metrics.prototype._getCollectionName = -> "metrics-#{@name}"