Package com.jitlogic.zorka.core.perfmon

Examples of com.jitlogic.zorka.core.perfmon.HiccupMeter.cycle()


public class HiccupMeterUnitTest extends ZorkaFixture {

    @Test
    public void testSimpleCpuHiccupRun() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU");
        meter.cycle(100);
        assertEquals(0, meter.getStats().getCalls());
        meter.cycle(500);
        assertEquals(1, meter.getStats().getCalls());
    }
View Full Code Here


    @Test
    public void testSimpleCpuHiccupRun() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU");
        meter.cycle(100);
        assertEquals(0, meter.getStats().getCalls());
        meter.cycle(500);
        assertEquals(1, meter.getStats().getCalls());
    }


    @Test
View Full Code Here


    @Test
    public void testSimpleCpuHiccupRunAndCheckFirstResult() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1000100);
        assertEquals(90, meter.getStats().getMaxTimeNs());
    }

View Full Code Here

    @Test
    public void testSimpleCpuHiccupRunAndCheckFirstResult() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1000100);
        assertEquals(90, meter.getStats().getMaxTimeNs());
    }


    @Test
View Full Code Here


    @Test
    public void testSimpleCpuHiccupRunAndCheckResultInUs() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1001010);
        assertEquals(1, meter.getStats().getMaxTimeUsCLR());
    }

    @Test
View Full Code Here

    @Test
    public void testSimpleCpuHiccupRunAndCheckResultInUs() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1001010);
        assertEquals(1, meter.getStats().getMaxTimeUsCLR());
    }

    @Test
    public void testTwoHiccupRuns() throws Exception {
View Full Code Here

    }

    @Test
    public void testTwoHiccupRuns() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1000100);
        assertEquals(90, meter.getStats().getMaxTimeNsCLR());
        meter.cycle(2001000);
        assertEquals(900, meter.getStats().getMaxTimeNsCLR());
    }
View Full Code Here

    @Test
    public void testTwoHiccupRuns() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1000100);
        assertEquals(90, meter.getStats().getMaxTimeNsCLR());
        meter.cycle(2001000);
        assertEquals(900, meter.getStats().getMaxTimeNsCLR());
    }
}
View Full Code Here

    public void testTwoHiccupRuns() throws Exception {
        HiccupMeter meter = perfmon.cpuHiccup("test", "zorka:name=TestHiccup", "CPU", 1, 1);
        meter.cycle(10);
        meter.cycle(1000100);
        assertEquals(90, meter.getStats().getMaxTimeNsCLR());
        meter.cycle(2001000);
        assertEquals(900, meter.getStats().getMaxTimeNsCLR());
    }
}
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.