Package com.springsource.insight.util

Examples of com.springsource.insight.util.IDataPoint


            assertEquals("Mismatched type for " + keyName, expType, actType);

            List<IDataPoint> dpList = mb.getPoints(keyName);
            assertEquals("Mismatched points size for " + keyName + " - " + dpList, 1, ListUtil.size(dpList));

            IDataPoint dp = dpList.get(0);
            assertEquals("Mismatched timestamp for " + keyName, expValue.getTime(), dp.getTime());

            switch (actType) {
                case COUNTER:
                    assertEquals("Mismatched value for " + keyName, 1.0d, dp.getValue(), 0.000001d);
                    break;

                case GAUGE:
                    assertEquals("Mismatched value for " + keyName, expValue.getValue(), dp.getValue(), 0.000001d);
                    break;

                default:
                    fail("Unknown value type for " + keyName + ": " + actType);
            }
View Full Code Here


        assertEquals("Mismatched counter type", PointType.COUNTER, mb.getMetricType(metricKey));

        List<IDataPoint> dpList = mb.getPoints(metricKey);
        assertEquals("Mismatched number of points: " + dpList, 1, ListUtil.size(dpList));

        IDataPoint dp = dpList.get(0);
        assertEquals("Mismatched errors count", expectedCount, Math.round(dp.getValue()));

        return mb;
    }
View Full Code Here

TOP

Related Classes of com.springsource.insight.util.IDataPoint

Copyright © 2018 www.massapicom. 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.