lib/statsd.js
function(options) {
  options = options || {};
  this.host = options.host || 'localhost';
  this.port = options.port || 8125;

  if (!statsdClients[this.host + ':' + this.port]) {
    statsdClients[this.host + ':' + this.port] = new StatsD(options);
  }

  this.client = statsdClients[this.host + ':' + this.port];
  this.sampleRate = options.sampleRate || 1;

  Writable.call(this, {objectMode: true});
}
function(options) {
  options = options || {};
  this.host = options.host || 'localhost';
  this.port = options.port || 8125;

  if (!statsdClients[this.host + ':' + this.port]) {
    statsdClients[this.host + ':' + this.port] = new StatsD(options);
  }

  this.client = statsdClients[this.host + ':' + this.port];
  this.sampleRate = options.sampleRate || 1;

  Writable.call(this, {objectMode: true});
}
function ( options ) { options = options || { } ; this . host = options . host || 'localhost' ; this . port = options . port || 8125 ; if ( ! statsdClients [ this . host + ':' + this . port ] ) { statsdClients [ this . host + ':' + this . port ] = new StatsD ( options ) ; } this . client = statsdClients [ this . host + ':' + this . port ] ; this . sampleRate = options . sampleRate || 1 ; Writable . call ( this , { objectMode : true } ) ; }
A writable stream that acts as a statsd sink for the zither instrument input sources.
@param {Obj} options Statsd client options. See https://github.com/sivy/node-statsd for options.
Additionally you can include sampleRate to control how Statsd samples data.
sampleRate defaults to 1.
A writable stream that acts as a statsd sink for the zither instrument input sources .