Package com.linkedin.helix.monitoring

Examples of com.linkedin.helix.monitoring.StatCollector.addData()


    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);
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.