Examples of feed()


Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate.feed()

    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.feed()

    @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.feed()

    @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.feed()

    @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.feed()

    @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));
    }

    @Test
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.CircularBucketAggregate.feed()

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

        bag.feed(5, 1);
    }
}
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.RateAggregate.feed()

 
 
  @Test
  public void testSlidingWindowWithSingleItem() throws Exception {
    RateAggregate wnd = new RateAggregate(100, -1);
    wnd.feed(100, 1);
    assertEquals(0.0, wnd.rate(), 0.0001);
  }
 
 
  @Test
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.RateAggregate.feed()

 
 
  @Test
  public void testSlidingWindowWithTwoItems() throws Exception {
    RateAggregate wnd = new RateAggregate(100, -1);
    wnd.feed(100, 1);
    wnd.feed(150, 1);
    assertEquals(50.0, wnd.rate(), 0.0001);
  }

 
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.RateAggregate.feed()

 
  @Test
  public void testSlidingWindowWithTwoItems() throws Exception {
    RateAggregate wnd = new RateAggregate(100, -1);
    wnd.feed(100, 1);
    wnd.feed(150, 1);
    assertEquals(50.0, wnd.rate(), 0.0001);
  }

 
  @Test
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.RateAggregate.feed()

 
  @Test
  public void testWindowNotYetSlide() throws Exception {
    RateAggregate wnd = new RateAggregate(100, -1);
    testUtil.mockCurrentTimeMillis(0, 0, 50, 50, 100, 100, 100);
    wnd.feed(100);
    wnd.feed(150);
    wnd.feed(200);
    assertEquals(100.0, wnd.rate(), 0.0001);
  }
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.