count method

void count (
  1. String name,
  2. [int delta = 1,
  3. double sampleRate]

Adds counter metric specified by name to this batch.

By default will increment the value by 1 but you can pass any value in delta.

The sampleRate parameter if provided tells statsd that this counter is being sampled. For instance, value 0.1 means that the counter is sampled every 1/10th of the time.


void count(String name, [int delta = 1, double sampleRate]) {
  _packets.add(_packet(_prefix, name, delta.toString(), 'c', sampleRate));