Package com.netflix.turbine.aggregator

Examples of com.netflix.turbine.aggregator.NumberList


        values2.put("99", 505);
    }

    @Test
    public void testCreate() {
        NumberList nl = NumberList.create(values);
        System.out.println(nl);
        assertEquals(Long.valueOf(10), nl.get("0"));
        assertEquals(Long.valueOf(50), nl.get("25"));
        assertEquals(Long.valueOf(100), nl.get("50"));
        assertEquals(Long.valueOf(250), nl.get("75"));
        assertEquals(Long.valueOf(500), nl.get("99"));
    }
View Full Code Here


        assertEquals(Long.valueOf(500), nl.get("99"));
    }

    @Test
    public void testDelta() {
        NumberList nl = NumberList.delta(values2, values);
        System.out.println(nl);
        assertEquals(Long.valueOf(5), nl.get("0"));
        assertEquals(Long.valueOf(5), nl.get("25"));
        assertEquals(Long.valueOf(5), nl.get("50"));
        assertEquals(Long.valueOf(5), nl.get("75"));
        assertEquals(Long.valueOf(5), nl.get("99"));
    }
View Full Code Here

        assertEquals(Long.valueOf(5), nl.get("99"));
    }

    @Test
    public void testSum() {
        NumberList nl = NumberList.create(values).sum(NumberList.create(values2));
        System.out.println(nl);
        assertEquals(Long.valueOf(25), nl.get("0"));
        assertEquals(Long.valueOf(105), nl.get("25"));
        assertEquals(Long.valueOf(205), nl.get("50"));
        assertEquals(Long.valueOf(505), nl.get("75"));
        assertEquals(Long.valueOf(1005), nl.get("99"));
    }
View Full Code Here

TOP

Related Classes of com.netflix.turbine.aggregator.NumberList

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.