Examples of CircularBucketAggregate


Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate

public class AggregateCountingUnitTest {

    @Test
    public void testCircularV1() {
        BucketAggregate bag = new CircularBucketAggregate(1, 10, 60, 300, 900);

        bag.feed(10, 10);
        bag.feed(11, 10);
        bag.feed(12, 10);

        assertEquals(30, bag.getDeltaV(0, 13));
        assertEquals(30, bag.getDeltaV(1, 14));
        assertEquals(30, bag.getDeltaV(2, 15));
    }
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate

    }


    @Test
    public void testCircularV2() {
        BucketAggregate bag = new CircularBucketAggregate(1, 4, 60);

        bag.feed(10, 10);
        bag.feed(50, 10);
        bag.feed(90, 10);

        assertEquals(20, bag.getDeltaV(0, 91));
    }
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate

    }


    @Test
    public void testCircularTimeInOneSection() {
        BucketAggregate bag = new CircularBucketAggregate(1, 4, 60);

        bag.feed(4, 1);
        bag.feed(11, 1);

        assertEquals(7, bag.getDeltaT(0, 12));
    }
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate

    }


    @Test
    public void testCircularTimeAcrossManySections() {
        BucketAggregate bag = new CircularBucketAggregate(1, 4, 60);

        bag.feed(5, 1);
        bag.feed(45, 1);

        assertEquals(40, bag.getDeltaT(0, 46));
    }
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate

        assertEquals(40, bag.getDeltaT(0, 46));
    }

    @Test
    public void testFeedSomeDataAndAskWayLater() {
        BucketAggregate bag = new CircularBucketAggregate(1, 10, 60, 300, 900);

        bag.feed(5, 1);
    }
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.