Package org.rioproject.watch

Examples of org.rioproject.watch.Statistics.addValue()


        for (int i = 0; i < 10; i++) {
            Vector<Double> v = new Vector<Double>();
            int count = (int) (Math.random() * 1000);
            for (int j = 0; j < count; j++) {
                double d = Math.random();
                stat.addValue(d);
                v.add(d);
            }
            assertCorrect(v, stat);
            stat.clearAll();
            assertCorrect(new Vector<Double>(), stat);
View Full Code Here


        for (int i = 0; i < 10; i++) {
            Vector<Double> v = new Vector<Double>();
            int count = (int) (Math.random() * 1000);
            for (int j = 0; j < count; j++) {
                double d = Math.random();
                stat.addValue(d);
                v.add(d);
            }
            Assert.assertEquals(v, stat.getValues());
            stat.clearAll();
            Assert.assertEquals(new Vector(), stat.getValues());
View Full Code Here

        for (int i = 0; i < 10; i++) {
            Vector<Double> v = new Vector<Double>();
            int count = (int) (Math.random() * 100);
            for (int j = 0; j < count; j++) {
                Double d = Math.random();
                stat.addValue(d);
                v.add(d);
                assertCorrect(v, stat);
            }
            stat.clearAll();
        }
View Full Code Here

            }
            stat.clearAll();
        }

        try {
            stat.addValue(null);
            Assert.fail("IllegalArgumentException expected but not thrown");
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

        for (int i = 0; i < 10; i++) {
            Vector<Double> v = new Vector<Double>();
            int count = (int) (Math.random() * 100);
            for (int j = 0; j < count; j++) {
                double d = Math.random();
                stat.addValue(d);
                v.add(d);
                assertCorrect(v, stat);
            }
            stat.clearAll();
        }
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.