com.twitter.common.metrics
Class Events

java.lang.Object
  extended by com.twitter.common.metrics.Events

public class Events
extends Object

Provides gauge composition to track per-event statistics, where a variable value is associated with each event. This will export a total of five metrics:


Constructor Summary
Events(String eventMetricName, String valueMetricName, MetricRegistry registry)
          Creates a new event composition using custom event and value metric names.
 
Method Summary
 void accumulate(long value)
          Accumulates a value and increments the event counter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Events

public Events(String eventMetricName,
              String valueMetricName,
              MetricRegistry registry)
Creates a new event composition using custom event and value metric names.

Parameters:
eventMetricName - Event metric name to export.
valueMetricName - Value metric name to export.
registry - Registry to associate metrics with.
Method Detail

accumulate

public void accumulate(long value)
Accumulates a value and increments the event counter.

Parameters:
value - Value to accumulate.