Examples of StatCollector


Examples of com.linkedin.helix.monitoring.StatCollector

  private ObjectName _objectName;

  public HelixMessageQueueMonitor(String clusterName)
  {
    _clusterName = clusterName;
    _messageQueueSize = new StatCollector();
    _beanServer = ManagementFactory.getPlatformMBeanServer();
    try
    {
      _objectName = new ObjectName("HelixMessageQueueMonitor: cluster=" + _clusterName);
      register(this, _objectName);
View Full Code Here

Examples of com.linkedin.helix.monitoring.StatCollector

  public HelixStageLatencyMonitor(String clusterName, String stageName) throws Exception
  {
    _clusterName = clusterName;
    _stageName = stageName;
    _stgLatency = new StatCollector();
    _beanServer = ManagementFactory.getPlatformMBeanServer();
    _objectName = new ObjectName("StageLatencyMonitor: " + "cluster=" + _clusterName + ",stage=" + _stageName);
    try
    {
      register(this, _objectName);
View Full Code Here

Examples of com.linkedin.helix.monitoring.StatCollector

  StateTransitionContext _context;
 
  public StateTransitionStatMonitor(StateTransitionContext context, TimeUnit unit)
  {
    _context = context;
    _monitorMap.put(LATENCY_TYPE.TOTAL, new StatCollector());
    _monitorMap.put(LATENCY_TYPE.EXECUTION, new StatCollector());
    reset();
  }
View Full Code Here

Examples of com.linkedin.helix.monitoring.StatCollector

  public MessageQueueMonitor(String clusterName, String instanceName)
  {
    _clusterName = clusterName;
    _instanceName = instanceName;
    _messageQueueSizeStat = new StatCollector();
  }
View Full Code Here

Examples of com.linkedin.helix.monitoring.StatCollector

  StateTransitionContext _context;
 
  public StateTransitionStatMonitor(StateTransitionContext context, TimeUnit unit)
  {
    _context = context;
    _monitorMap.put(LATENCY_TYPE.TOTAL, new StatCollector());
    _monitorMap.put(LATENCY_TYPE.EXECUTION, new StatCollector());
    reset();
  }
View Full Code Here

Examples of com.linkedin.helix.monitoring.StatCollector

public class TestStatCollector
{
  @Test(groups={ "unitTest" })
  public void TestCollectData()
  {
    StatCollector collector = new StatCollector();
   
    int nPoints = 100;
    for (int i = 0; i< nPoints; i++)
    {
      collector.addData(i*1000);
    }
    AssertJUnit.assertEquals(collector.getNumDataPoints(), nPoints);
    AssertJUnit.assertEquals((long)collector.getMax(), 99000);
    AssertJUnit.assertEquals((long)collector.getTotalSum(), 4950000);
    AssertJUnit.assertEquals((long)collector.getPercentile(40), 39400);
    AssertJUnit.assertEquals((long)collector.getMean(), 49500);
    AssertJUnit.assertEquals((long)collector.getMin(), 0);
   
    collector.reset();
   
    AssertJUnit.assertEquals(collector.getNumDataPoints(), 0);
    AssertJUnit.assertEquals((long)collector.getMax(), 0);
    AssertJUnit.assertEquals((long)collector.getTotalSum(), 0);
    AssertJUnit.assertEquals((long)collector.getPercentile(40), 0);
    AssertJUnit.assertEquals((long)collector.getMean(), 0);
    AssertJUnit.assertEquals((long)collector.getMin(), 0);
   
  }
View Full Code Here

Examples of org.apache.helix.monitoring.StatCollector

  StateTransitionContext _context;
 
  public StateTransitionStatMonitor(StateTransitionContext context, TimeUnit unit)
  {
    _context = context;
    _monitorMap.put(LATENCY_TYPE.TOTAL, new StatCollector());
    _monitorMap.put(LATENCY_TYPE.EXECUTION, new StatCollector());
    reset();
  }
View Full Code Here

Examples of org.apache.helix.monitoring.StatCollector

  public HelixStageLatencyMonitor(String clusterName, String stageName) throws Exception
  {
    _clusterName = clusterName;
    _stageName = stageName;
    _stgLatency = new StatCollector();
    _beanServer = ManagementFactory.getPlatformMBeanServer();
    _objectName = new ObjectName("StageLatencyMonitor: " + "cluster=" + _clusterName + ",stage=" + _stageName);
    try
    {
      register(this, _objectName);
View Full Code Here

Examples of org.apache.helix.monitoring.StatCollector

  public MessageQueueMonitor(String clusterName, String instanceName)
  {
    _clusterName = clusterName;
    _instanceName = instanceName;
    _messageQueueSizeStat = new StatCollector();
  }
View Full Code Here

Examples of org.apache.helix.monitoring.StatCollector

  StateTransitionContext _context;

  public StateTransitionStatMonitor(StateTransitionContext context, TimeUnit unit) {
    _context = context;
    _monitorMap.put(LATENCY_TYPE.TOTAL, new StatCollector());
    _monitorMap.put(LATENCY_TYPE.EXECUTION, new StatCollector());
    reset();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.